]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: arm/arm64: Enable adaptative WFE trapping
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 21 Jun 2018 09:43:59 +0000 (10:43 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 9 Jul 2018 10:38:24 +0000 (11:38 +0100)
commitde73708915adc1b3f05e617a86da6b2d68fae141
tree37f70c868acf33f7645e67c42b599cd5034614c4
parent0a72a5ab9feb8ba6101b00bbcac14cdbae1d1df7
KVM: arm/arm64: Enable adaptative WFE trapping

Trapping blocking WFE is extremely beneficial in situations where
the system is oversubscribed, as it allows another thread to run
while being blocked. In a non-oversubscribed environment, this is
the complete opposite, and trapping WFE is just unnecessary overhead.

Let's only enable WFE trapping if the CPU has more than a single task
to run (that is, more than just the vcpu thread).

Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/kvm_emulate.h
arch/arm64/include/asm/kvm_emulate.h
virt/kvm/arm/arm.c