* [PATCH v3 0/3] KVM: Dynamic halt_poll_ns
@ 2015-08-26 9:14 Wanpeng Li
0 siblings, 0 replies; only message in thread
From: Wanpeng Li @ 2015-08-26 9:14 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: David Matlack, kvm, linux-kernel, Wanpeng Li
v2 -> v3:
* grow/shrink vcpu->halt_poll_ns by *halt_poll_ns_grow or /halt_poll_ns_shrink
* drop the macros and hard coding the numbers in the param definitions
* update the comments "5-7 us"
* remove halt_poll_ns_max and use halt_poll_ns as the max halt_poll_ns time,
vcpu->halt_poll_ns start at zero
* drop the wrappers
* move the grow/shrink logic before "out:" w/ "if (waited)"
v1 -> v2:
* change kvm_vcpu_block to read halt_poll_ns from the vcpu instead of
the module parameter
* use the shrink/grow matrix which is suggested by David
* set halt_poll_ns_max to 2ms
There is a downside of halt_poll_ns since poll is still happen for idle
VCPU which can waste cpu usage. This patchset add the ability to adjust
halt_poll_ns dynamically.
There are two new kernel parameters for changing the halt_poll_ns:
halt_poll_ns_grow and halt_poll_ns_shrink. The shrink/grow matrix is
suggested by David:
if (poll successfully for interrupt): stay the same
else if (length of kvm_vcpu_block is longer than halt_poll_ns_max): shrink
else if (length of kvm_vcpu_block is less than halt_poll_ns_max): grow
Wanpeng Li (3):
KVM: make halt_poll_ns per-VCPU
KVM: dynamic halt_poll_ns adjustment
KVM: trace kvm_halt_poll_ns grow/shrink
include/linux/kvm_host.h | 1 +
include/trace/events/kvm.h | 30 ++++++++++++++++++++++++++
virt/kvm/kvm_main.c | 52 +++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 80 insertions(+), 3 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-26 9:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-26 9:14 [PATCH v3 0/3] KVM: Dynamic halt_poll_ns Wanpeng Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).