MCS locks and qspinlocks
MCS locks and qspinlocks
Posted Mar 12, 2014 1:32 UTC (Wed) by ncm (guest, #165)Parent article: MCS locks and qspinlocks
According to the description, mcs_lock_t::locked seems to always be only 1 or 0, but it is described as a counter. It seems, too, that locked is only ever updated by the holder of the lock. Could it not be stolen from mcs_lock_t::next, resulting in fewer memory bus operations and a one-word pointer?
Furthermore... why use MCS at all if qspinlocks are both smaller and faster? Should all the MCS locks become qspinlocks, over time?
