Measuring Mutexes, Spinlocks and how Bad the Linux Scheduler Really is | Probably Dance
This blog post is one of those things that just blew up. From a tiny observation at work about odd behaviors of spinlocks I spent months trying to find good benchmarks, (still not entirely successful) writing my own spinlocks, mutexes and condition variables and even contributing a patch to the Linux kernel. The main thing I’ll try to answer is to give some more informed guidance on the endless discussion of mutex vs spinlock. Besides that I found that most mutex implementations are really good, that most spinlock implementations are pretty bad, and that the Linux scheduler is OK but far from ideal. The most popular replacement, the MuQSS scheduler has other problems instead. (the Windows scheduler is pretty good though) So this all started like this: I overheard somebody at work complaining about mysterious stalls while porting Rage 2 to Stadia. (edit disclaimer: This blog post got more attention than anticipated, so I decided to clarify that I didn’t work on the Rage 2 port to Stadia
Measuring Mutexes, Spinlocks and how Bad the Linux Scheduler Really is | Probably Dance Probably Dance I can program and like games Measuring Mutexes, Spinlocks and how Bad the Linux Scheduler Really is by Malte Skarupke This blog post is one of those things that just blew up. From a tiny observation at work about odd behaviors of spinlocks I spent months trying to find good benchmarks, (still not entirely successful) writing my own spinlocks, mutexes and condition variables and even contributing a patch to the Linux kernel. The main thing I’ll try to answer is to give some more informed
Explore this link on the map →saved by
related reading
- Spinlocks Considered Harmfulmatklad.github.io
- Unreliable Guide To Locking — The Linux Kernel documentationdocs.kernel.org
- Locking in WebKit | WebKitwebkit.org
- Brain Fuck Scheduler - Wikipediaen.wikipedia.org
- Introduction to Real-time Systemsdesign.ros2.org
- Real-time programming with Linux, part 2: configuring Linux for real-time - Shuhao's Blogshuhaowu.com
- abseil / Performance Hintsabseil.io
- sled theoretical performance guide | sled-rs.github.iosled.rs
- sled theoretical performance guide | sled-rs.github.iosled.rs
- Zaval.org -> Resources -> Library -> Recursive mutexes by David Butenhofzaval.org
- Slice Dat Time | Putting the "You" in CPUcpu.land
- LittleBookOfSemaphores.pdfgreenteapress.com