Threadwell

Recent Notes

  • DemetriSpanos

    Oct 06, 2026

    • archive
    • twitter
    • demetrispanos
  • NOTimothyLottes

    Oct 06, 2026

    • archive
    • twitter
    • notimothylottes
  • bonzajplc

    Oct 06, 2026

    • archive
    • twitter
    • bonzajplc
Home

❯

Archive

❯

Threads

❯

SebAaltonen

❯

This is how you write a good x64 spinlock: Use two stage construct.

❯

@SebAaltonen @kenpex Its a shame there is no mm_pause in the BAD case - it’s not obvious how much of the win comes from not using CAS vs pausing.

@SebAaltonen @kenpex Its a shame there is no mm_pause in the BAD case - it’s not obvious how much of the win comes from not using CAS vs pausing.

Properties5
typearchive
sourcetwitter
date2019-05-06
tagsarchive, twitter, sebaaltonen
description@SebAaltonen @kenpex Its a shame there is no mm_pause in the BAD case - it’s not obvious how much of the win comes from not using CAS vs pausing.

May 06, 20191 min read

  • archive
  • twitter
  • sebaaltonen

Source

  • URL: https://x.com/morfar/status/1125272627868852225
  • Author: Jonas Meyer (@morfar)
  • Posted: 2019-05-06 05:34:35

Branch

1/ @morfar

@SebAaltonen @kenpex

Its a shame there is no mm_pause in the BAD case - it’s not obvious how much of the win comes from not using CAS vs pausing.

2/ @SebAaltonen

@morfar @kenpex

Yeah. Should definitely have 3 benchmarks cases. Bad, better, best.

Related

  • Spine: 2019-05-05-this-is-how-you-write-a-good-x64-spinlock-use-two

Graph View

  • Source
  • Branch
  • Related

Backlinks

  • This is how you write a good x64 spinlock: Use two stage construct.

Created with Quartz v5.0.0 © 2026

  • GitHub