]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Implement paravirt qspinlocks for SPLPAR
authorNicholas Piggin <npiggin@gmail.com>
Fri, 24 Jul 2020 13:14:21 +0000 (23:14 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 26 Jul 2020 14:01:29 +0000 (00:01 +1000)
commit31d6910fb95f216ec6bc52aa4683919fc1b06049
tree1de7272a98830301f6d21a1b8cdab7d28d0e83c1
parent71d76dea88f20e5bc22f97c1787d83db2ab6ef80
powerpc/pseries: Implement paravirt qspinlocks for SPLPAR

This implements the generic paravirt qspinlocks using H_PROD and
H_CONFER to kick and wait.

This uses an un-directed yield to any CPU rather than the directed
yield to a pre-empted lock holder that paravirtualised simple
spinlocks use, that requires no kick hcall. This is something that
could be investigated and improved in future.

Performance results can be found in the commit which added queued
spinlocks.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200724131423.1362108-5-npiggin@gmail.com
arch/powerpc/include/asm/paravirt.h
arch/powerpc/include/asm/qspinlock.h
arch/powerpc/include/asm/qspinlock_paravirt.h [new file with mode: 0644]
arch/powerpc/include/asm/spinlock.h
arch/powerpc/platforms/pseries/Kconfig
arch/powerpc/platforms/pseries/setup.c
include/asm-generic/qspinlock.h