cpuidle: haltpoll: allow force loading on hosts without the REALTIME hint
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
Wed, 4 Mar 2020 11:32:48 +0000 (12:32 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 14 Mar 2020 10:39:07 +0000 (11:39 +0100)
commitdd52551fb786aa7371bf9fe922573deafc26287e
tree5aa2489bb1895df8e4c49cb15137ce1e3c848309
parent317e5ec3ecaaa2d461d3044eb6cb9cc3a59de2f2
cpuidle: haltpoll: allow force loading on hosts without the REALTIME hint

Before commit 1328edca4a14 ("cpuidle-haltpoll: Enable kvm guest polling
when dedicated physical CPUs are available") the cpuidle-haltpoll driver
could also be used in scenarios when the host does not advertise the
KVM_HINTS_REALTIME hint.

While the behavior introduced by the aforementioned commit makes sense as
the default there are cases where the old behavior is desired, for example,
when other kernel changes triggered by presence by this hint are unwanted,
for some workloads where the latency benefit from polling overweights the
loss from idle CPU capacity that otherwise would be available, or just when
running under older Qemu versions that lack this hint.

Let's provide a typical "force" module parameter that allows restoring the
old behavior.

Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/cpuidle-haltpoll.c