|
|
Log in / Subscribe / Register

MCS locks and qspinlocks

MCS locks and qspinlocks

Posted Mar 12, 2014 11:40 UTC (Wed) by corbet (editor, #1)
In reply to: MCS locks and qspinlocks by ncm
Parent article: MCS locks and qspinlocks

The qspinlock implementation actually uses MCS locks - but only the four-element per-CPU array of them. So the MCS locks won't go away. That array would also be insufficient if one were to try to put qspinlocks into mutexes, since those can sleep and an arbitrary number of them can be acquired.


to post comments

MCS locks and qspinlocks

Posted Mar 21, 2014 0:29 UTC (Fri) by kevinm (guest, #69913) [Link] (1 responses)

Mutexes can't sleep while holding a spinlock, though.

MCS locks and qspinlocks

Posted Mar 25, 2014 1:47 UTC (Tue) by joern (guest, #22392) [Link]

The array is not for processes holding a lock, but for processes sleeping on a lock. If it were for processes holding a lock, it wouldn't even be sufficient for regular spinlocks.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds