Quantcast
Channel: lkml.org : Shesha Sreenivasamurthy
Viewing all articles
Browse latest Browse all 1267

Re: [PATCH 2/2 v2] sched/wait: Introduce lock breaker in wake_up_p ...

$
0
0
Linus Torvalds writes: (Summary) Right now we basically do:
- clear lock bit and atomically test if contended (and we play games with bit numbering to do that atomic test efficiently) with bit numbering to do that atomic test efficiently) - if contended, wake things up
- if contended, wake things up
and you'd change the logic to be
and you'd change the logic to be
- if contended, don't clear the lock bit at all, just transfer the lock ownership directly to the waiters by walking the wait list lock ownership directly to the waiters by walking the wait list - clear the lock bit only once there are no more wait entries (either because there were no waiters at all, or because all the entries were just waiting for the lock to be released)
just waiting for the lock to be released)
which is certainly doable with a couple of small extensions to the page wait key data structure.
page wait key data structure.
But most of my clever schemes the last few days were abject failures, and honestly, it's late

Viewing all articles
Browse latest Browse all 1267

Trending Articles