News for hackers. Stuff that matters.
Re:Measuring mutexes, spinlocks and how bad the Linux schedu... by ezoe on Thursday January 02, 2020 @03:07AM (#21933707)
My take on this article is it doesn't worth implementing your own spinlock. The OS can take advantage of their implementation details while you can't portably implement it. The OS implementation changes in the future or varies.

Even if you use _mm_pause() to let CPU know it's doing spinlock, for the eye of the OS, it still looks like a busy thread, it can't be distinguished from non-spinlock computation heavy thread.

There are no comments on this comment yet.