linux_dsm_epyc7002/arch/arm/kvm
Marc Zyngier 58d5ec8f8e ARM: KVM: Yield CPU when vcpu executes a WFE
On an (even slightly) oversubscribed system, spinlocks are quickly
becoming a bottleneck, as some vcpus are spinning, waiting for a
lock to be released, while the vcpu holding the lock may not be
running at all.

This creates contention, and the observed slowdown is 40x for
hackbench. No, this isn't a typo.

The solution is to trap blocking WFEs and tell KVM that we're
now spinning. This ensures that other vpus will get a scheduling
boost, allowing the lock to be released more quickly. Also, using
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT slightly improves the performance
when the VM is severely overcommited.

Quick test to estimate the performance: hackbench 1 process 1000

2xA15 host (baseline):	1.843s

2xA15 guest w/o patch:	2.083s
4xA15 guest w/o patch:	80.212s
8xA15 guest w/o patch:	Could not be bothered to find out

2xA15 guest w/ patch:	2.102s
4xA15 guest w/ patch:	3.205s
8xA15 guest w/ patch:	6.887s

So we go from a 40x degradation to 1.5x in the 2x overcommit case,
which is vaguely more acceptable.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2013-10-17 15:26:50 -07:00
..
arm.c ARM/ARM64: KVM: Implement KVM_ARM_PREFERRED_TARGET ioctl 2013-10-02 11:29:48 -07:00
coproc_a7.c KVM: ARM: Add support for Cortex-A7 2013-10-12 17:45:30 -07:00
coproc_a15.c KVM: ARM: Add support for Cortex-A7 2013-10-12 17:45:30 -07:00
coproc.c KVM: ARM: Add support for Cortex-A7 2013-10-12 17:45:30 -07:00
coproc.h ARM: KVM: Fix 64-bit coprocessor handling 2013-08-06 11:32:30 -07:00
emulate.c KVM: ARM: Fix typo in comments of inject_abt() 2013-10-02 17:29:19 +01:00
guest.c KVM: ARM: Add support for Cortex-A7 2013-10-12 17:45:30 -07:00
handle_exit.c ARM: KVM: Yield CPU when vcpu executes a WFE 2013-10-17 15:26:50 -07:00
init.S ARM: kvm: use inner-shareable barriers after TLB flushing 2013-08-12 12:25:45 +01:00
interrupts_head.S KVM fixes for 3.11 2013-07-03 13:21:40 -07:00
interrupts.S Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-09-05 18:07:32 -07:00
Kconfig ARM: KVM: Yield CPU when vcpu executes a WFE 2013-10-17 15:26:50 -07:00
Makefile KVM: ARM: Add support for Cortex-A7 2013-10-12 17:45:30 -07:00
mmio.c KVM: ARM: Squash len warning 2013-08-11 21:03:39 -07:00
mmu.c Merge branches 'debug-choice', 'devel-stable' and 'misc' into for-linus 2013-09-05 10:34:15 +01:00
perf.c ARM: KVM: add support for minimal host vs guest profiling 2013-04-28 21:44:01 -07:00
psci.c ARM: KVM: Don't handle PSCI calls via SMC 2013-06-26 10:50:02 -07:00
reset.c KVM: ARM: Add support for Cortex-A7 2013-10-12 17:45:30 -07:00
trace.h ARM: KVM: Simplify tracepoint text 2013-08-30 15:47:53 -07:00