We did take a look a few years ago. Of course, pure MCS locks have an incompatible API, but the K42 folks at IBM Research came up with a variant of MCS locks that matched the Linux-kernel spin_lock() primitives. If I remember correctly, MCS locks outperformed the various NUMA-aware locking primitives, but were outperformed by simple spinlocks. I would expect that ticket locks would out-perform MCS locks at low contention levels (the common case in modern Linux kernels). I am not sure how MCS locks and ticket locks would compare at high levels of contention -- the ticket locks avoid the "thundering herd" problem, so might do quite well. Any benchmark results out there?
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds