News for hackers. Stuff that matters.
Re:Why Skylake CPUs Are Sometimes 50% Slower (2018) by CodesInChaos on Thursday June 11, 2020 @07:59PM (#23494515)
You're right that pure spinlocks are usually a bad approach in usermode. Most implementations use a hybrid approach, where you spin for a short while, on the assumption that another core holds the lock for only a short while, before you switch to blocking the thread.

You might want to read https://webkit.org/blog/6161/locking-in-webkit/ about how Chrome implements high performance locks.

Re:Why Skylake CPUs Are Sometimes 50% Slower (2018) by comex on Thursday June 11, 2020 @08:09PM (#23494590)
Safari, not Chrome.
Re:Why Skylake CPUs Are Sometimes 50% Slower (2018) by saagarjha on Thursday June 11, 2020 @09:01PM (#23494912)
I think that code ships for all WebKit-based browsers (though not Chrome).
Re:Why Skylake CPUs Are Sometimes 50% Slower (2018) by trasz on Thursday June 11, 2020 @09:18PM (#23495002)
Doesn't Chrome use Blink, a fork of Webkit?
Re:Why Skylake CPUs Are Sometimes 50% Slower (2018) by saagarjha on Thursday June 11, 2020 @09:20PM (#23495019)
It does, but it forked long before that blog post was written.