]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
KVM: PPC: Decrease the powerpc default halt poll max value
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Fri, 14 Oct 2016 00:53:22 +0000 (11:53 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Mon, 28 Nov 2016 00:48:47 +0000 (11:48 +1100)
KVM_HALT_POLL_NS_DEFAULT is an arch specific constant which sets the
default value of the halt_poll_ns kvm module parameter which determines
the global maximum halt polling interval.

The current value for powerpc is 500000 (500us) which means that any
repetitive workload with a period of less than that can drive the cpu
usage to 100% where it may have been mostly idle without halt polling.
This presents the possibility of a large increase in power usage with
a comparatively small performance benefit.

Reduce the default to 10000 (10us) and a user can tune this themselves
to set their affinity for halt polling based on the trade off between power
and performance which they are willing to make.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/include/asm/kvm_host.h

index f15713ae3f34507292d8afa3cde64f77e84248cb..e59b172666cd31aa35635216d74ecdb21106b0dd 100644 (file)
@@ -48,7 +48,7 @@
 #ifdef CONFIG_KVM_MMIO
 #define KVM_COALESCED_MMIO_PAGE_OFFSET 1
 #endif
-#define KVM_HALT_POLL_NS_DEFAULT 500000
+#define KVM_HALT_POLL_NS_DEFAULT 10000 /* 10 us */
 
 /* These values are internal and can be increased later */
 #define KVM_NR_IRQCHIPS          1