summaryrefslogtreecommitdiff
path: root/drivers/cpuidle/cpuidle-haltpoll.c
diff options
context:
space:
mode:
authorJoao Martins <joao.m.martins@oracle.com>2019-09-08 02:45:22 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-09-11 18:36:30 +0300
commit7321440829a27d58c88b7fcfcbbc37487b5e39a5 (patch)
tree72bdacfa727c89b79feca82868b45177d2b86361 /drivers/cpuidle/cpuidle-haltpoll.c
parentcb5d8c45ab6c3daf8269e550cfb2d5018a876fe3 (diff)
downloadlinux-7321440829a27d58c88b7fcfcbbc37487b5e39a5.tar.xz
cpuidle-haltpoll: set haltpoll as preferred governor
Right now, guest current governors have the following ratings: * ladder -> 10 * teo -> 19 * menu -> 20 * haltpoll -> 21 * ladder + nohz=off -> 25 haltpoll governor got introduced and it is now the default governor given its highest rating -- with ladder+nohz being the exception -- regardless of idle driver in the guest. An example of an undesirable case is x86 KVM guests with MWAIT which have intel_idle registered first, and consequently will have haltpoll be used as governor which would get limited to a poll state and state 1 and the other states wouldn't get used. To keep the previous defaults we decrease rating of governor to 9 (below current lowest rating) and thus rely on @governor switch on cpuidle_register_driver() to tie in haltpoll idle driver and governor together. Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle/cpuidle-haltpoll.c')
-rw-r--r--drivers/cpuidle/cpuidle-haltpoll.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpuidle/cpuidle-haltpoll.c b/drivers/cpuidle/cpuidle-haltpoll.c
index 56d8ab814466..519e90d125cf 100644
--- a/drivers/cpuidle/cpuidle-haltpoll.c
+++ b/drivers/cpuidle/cpuidle-haltpoll.c
@@ -34,6 +34,7 @@ static int default_enter_idle(struct cpuidle_device *dev,
static struct cpuidle_driver haltpoll_driver = {
.name = "haltpoll",
+ .governor = "haltpoll",
.owner = THIS_MODULE,
.states = {
{ /* entry 0 is for polling */ },