locking/rtmutex: Add adaptive spinwait mechanism
Going to sleep when locks are contended can be quite inefficient when the
contention time is short and the lock owner is running on a different CPU.
The MCS mechanism cannot be used because MCS is strictly FIFO ordered while
for rtmutex based locks the waiter ordering is priority based.
Provide a simple adaptive spinwait mechanism which currently restricts the
spinning to the top priority waiter.
[ tglx: Provide a contemporary changelog, extended it to all rtmutex based
locks and updated it to match the other spin on owner implementations ]
Originally-by: Gregory Haskins <firstname.lastname@example.org>
Signed-off-by: Steven Rostedt <email@example.com>
Signed-off-by: Thomas Gleixner <firstname.lastname@example.org>
Signed-off-by: Peter Zijlstra (Intel) <email@example.com>
Signed-off-by: Ingo Molnar <firstname.lastname@example.org>
1 file changed