Re: [PATCH] cpuidle: Allow configuration of the polling interval before cpuidle enters a c-state

From: Mel Gorman
Date: Fri Nov 27 2020 - 09:46:08 EST


On Fri, Nov 27, 2020 at 11:08:11AM -0300, Marcelo Tosatti wrote:
> > It requires the admin to know how cpuidle works and why this
> > particular polling limit is likely to be suitable for the given
> > workload. And whether or not the default polling limit should be
> > changed at all.
>
> KVM polling (virt/kvm/kvm_main.c grow_halt_poll_ns/shrink_halt_poll_ns)
> tries to adjust the polling window based on poll success/failure.
>
> The cpuidle haltpoll governor (for KVM guests) uses the same adjustment
> logic.
>
> Perhaps a similar (or improved) scheme can be adapted to baremetal.
>
> https://www.kernel.org/doc/Documentation/virtual/kvm/halt-polling.txt

I'm aware of the haltpoll governor and why it makes sense for KVM. As
adaptive polling would increase the exit latency, I assumed it would be
an unpopular approach on bare metal. If that is not the case, then it
would make more sense that the haltpoll adaptive logic would simply be
part of the core and not a per-governor decision.

--
Mel Gorman
SUSE Labs