MCS Locks and qspinlocks

Jonathan Corbet (via Kyle Sluder): Note that the use of an atomic swap operation on the main lock means that only CPU 2 can have a pointer to CPU 1’s mcs_spinlock structure. So there is no need for atomic operations when making changes to that structure, though some careful programming is still needed to make sure that … Continue reading MCS Locks and qspinlocks