[PATCH v3 10/12] locking/ww_mutex: Yield to other waiters from optimistic spin

2017-01-05 Thread Peter Zijlstra
OK, so I got this far, although I stuffed two patches in the middle (which I should probably pull to the beginning and did this one patch differently. I've not really tested the result yet, will attempt to do so tomorrow. Please have a look at the current state of things here:

[PATCH v3 10/12] locking/ww_mutex: Yield to other waiters from optimistic spin

2016-12-21 Thread Nicolai Hähnle
From: Nicolai Hähnle Lock stealing is less beneficial for w/w mutexes since we may just end up backing off if we stole from a thread with an earlier acquire stamp that already holds another w/w mutex that we also need. So don't spin optimistically unless we are sure