linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] misc fixes on halt-poll code both KVM and guest
@ 2019-11-06  9:08 Zhenzhong Duan
  2019-11-06  9:08 ` [PATCH v2 1/4] cpuidle-haltpoll: ensure grow start value is nonzero Zhenzhong Duan
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Zhenzhong Duan @ 2019-11-06  9:08 UTC (permalink / raw)
  To: linux-kernel, kvm
  Cc: pbonzini, rkrcmar, rafael.j.wysocki, joao.m.martins, mtosatti,
	Zhenzhong Duan

This patchset tries to fix below issues:

1. Admin could set halt_poll_ns to 0 at runtime to disable poll and kernel
behave just like the generic halt driver. Then If guest_halt_poll_grow_start
is set to 0 and guest_halt_poll_ns set to nonzero later, cpu_halt_poll_us will
never grow beyond 0. The first two patches fix this issue from both kvm and
guest side.

2. guest_halt_poll_grow_start and guest_halt_poll_ns could be adjusted at
runtime by admin, this could make a window where cpu_halt_poll_us jump out
of the boundary. the window could be long in some cases(e.g. guest_halt_poll_grow_start
is bumped and cpu_halt_poll_us is shrinking) The last two patches fix this
issue from both kvm and guest side.

3. The 4th patch also simplifies branch check code.

v2:
Rewrite the patches and drop unnecessory changes

Zhenzhong Duan (4):
  cpuidle-haltpoll: ensure grow start value is nonzero
  KVM: ensure grow start value is nonzero
  cpuidle-haltpoll: ensure cpu_halt_poll_us in right scope
  KVM: ensure vCPU halt_poll_us in right scope

 drivers/cpuidle/governors/haltpoll.c | 50 ++++++++++++++++++++++++-----------
 virt/kvm/kvm_main.c                  | 51 ++++++++++++++++++++++++------------
 2 files changed, 68 insertions(+), 33 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-06 11:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06  9:08 [PATCH v2 0/4] misc fixes on halt-poll code both KVM and guest Zhenzhong Duan
2019-11-06  9:08 ` [PATCH v2 1/4] cpuidle-haltpoll: ensure grow start value is nonzero Zhenzhong Duan
2019-11-06  9:08 ` [PATCH v2 2/4] KVM: " Zhenzhong Duan
2019-11-06  9:08 ` [PATCH v2 3/4] cpuidle-haltpoll: ensure cpu_halt_poll_us in right scope Zhenzhong Duan
2019-11-06  9:08 ` [PATCH v2 4/4] KVM: ensure vCPU halt_poll_us " Zhenzhong Duan
2019-11-06 11:05 ` [PATCH v2 0/4] misc fixes on halt-poll code both KVM and guest Rafael J. Wysocki

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).