powerpc/qspinlock: provide accounting and options for sleepy locks
authorNicholas Piggin <npiggin@gmail.com>
Sat, 26 Nov 2022 09:59:31 +0000 (19:59 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Dec 2022 06:48:50 +0000 (17:48 +1100)
commit12b459a5ebf3308e718bc1dd48acb7c4cf7f1a75
treee2d0a72d2511fd0f86fb78b8a2e556966621c250
parent39dfc73596b48bb50cf7e4f3f54e38427dda5b4e
powerpc/qspinlock: provide accounting and options for sleepy locks

Finding the owner or a queued waiter on a lock with a preempted vcpu is
indicative of an oversubscribed guest causing the lock to get into
trouble. Provide some options to detect this situation and have new CPUs
avoid queueing for a longer time (more steal iterations) to minimise the
problems caused by vcpu preemption on the queue.

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-17-npiggin@gmail.com
arch/powerpc/include/asm/qspinlock_types.h
arch/powerpc/lib/qspinlock.c