]> Gentwo Git Trees - linux/.git/commit
KVM: s390: improve interrupt cpu for wakeup
authorChristian Borntraeger <borntraeger@linux.ibm.com>
Thu, 4 Sep 2025 11:39:27 +0000 (13:39 +0200)
committerChristian Borntraeger <borntraeger@linux.ibm.com>
Mon, 8 Sep 2025 09:12:39 +0000 (11:12 +0200)
commit352ccf890a3e91f58bc32503f9afdc161bc2c34a
treec9e0e220e16bf1eb50f87e60bd07081db6914945
parent57d88f02eb4449d96dfee3af4b7cd4287998bdbd
KVM: s390: improve interrupt cpu for wakeup

Turns out that picking an idle CPU for floating interrupts has some
negative side effects. The guest will keep the IO workload on its CPU
and rather use an IPI from the interrupt CPU instead of moving workload.
For example a guest with 2 vCPUs and 1 fio process might run that fio on
vcpu1. If after diag500 both vCPUs are idle then vcpu0 is woken up. The
guest will then do an IPI from vcpu0 to vcpu1.

So lets change the heuristics and prefer the last CPU that went to
sleep. This one is likely still in halt polling and can be woken up
quickly.

This patch shows significant improvements in terms of bandwidth or
cpu consumption for fio and uperf workloads and seems to be a net
win.

Link: https://lore.kernel.org/linux-s390/20250904113927.119306-1-borntraeger@linux.ibm.com/
Reviewed-by: Christoph Schlameuß <schlameuss@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/kvm/interrupt.c