Linus Torvalds writes: (Summary)
- an exclusive wait (ie somebody who waits to get the bit for
locking) adds itself to the 'exclusive' llist
- non-locking waiters add themselves to the 'all' list
- we can use llist_del_all() to remove the 'all' list and then walk
it and wake them up without any locks
- we can use llist_del_first() to remove the first exclusive waiter
and wait _it_ up without any locks. We'd use this two-level
list: one list to find the page/bit thing, and then two lists within
that fdor the wait-queues for just *that* page/bit.
↧