]> 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)
commita8b636d07e8439762b18d01638fe018f75629c60
tree1de7272a98830301f6d21a1b8cdab7d28d0e83c1
parente02e52a60d42e5667d0fdeb54b2463eacd3c1cf9
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