]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Use doorbells even if XIVE is available
authorNicholas Piggin <npiggin@gmail.com>
Sun, 26 Jul 2020 03:51:54 +0000 (13:51 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jul 2020 11:02:09 +0000 (21:02 +1000)
commit6b62439c00a77ee6a09d588880f8ff59f9736990
treeb7192dc38b5dc1d99f0cb7a080150309a21abb90
parent7006a4c1eebfeeacf3ea46bd8e33ca3c71f0b91a
powerpc/pseries: Use doorbells even if XIVE is available

KVM supports msgsndp in guests by trapping and emulating the
instruction, so it was decided to always use XIVE for IPIs if it is
available. However on PowerVM systems, msgsndp can be used and gives
better performance. On large systems, high XIVE interrupt rates can
have sub-linear scaling, and using msgsndp can reduce the load on
the interrupt controller.

So switch to using core local doorbells even if XIVE is available.
This reduces performance for KVM guests with an SMT topology by
about 50% for ping-pong context switching between SMT vCPUs. An
option vector (or dt-cpu-ftrs) could be defined to disable msgsndp
to get KVM performance back.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200726035155.1424103-3-npiggin@gmail.com
arch/powerpc/platforms/pseries/smp.c