powerpc/qspinlock: implement option to yield to previous node
authorNicholas Piggin <npiggin@gmail.com>
Sat, 26 Nov 2022 09:59:23 +0000 (19:59 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Dec 2022 06:48:49 +0000 (17:48 +1100)
commitbd48287b2cf4cd6e95576db3a94fd2a7cdf9832d
tree533571715d41dceb7f80df1cc23ceeb8424deb58
parent085f03311bcede99550e08a1f7cad41bf758b460
powerpc/qspinlock: implement option to yield to previous node

Queued waiters which are not at the head of the queue don't spin on
the lock word but their qnode lock word, waiting for the previous queued
CPU to release them. Add an option which allows these waiters to yield
to the previous CPU if its vCPU is preempted.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221126095932.1234527-9-npiggin@gmail.com
arch/powerpc/lib/qspinlock.c