diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-12 01:11:03 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-12 01:11:03 +0100 |
commit | a7da4813429cf36abd042e6da72cc6641767d52f (patch) | |
tree | a7552f1e89ae6afb3ebb7051bbac86452a8684f0 /drivers/cpuidle/governors/menu.c | |
parent | Merge branches 'pm-pci' and 'pm-core' (diff) | |
parent | drivers/cpuidle: make cpuidle-exynos.c explicitly non-modular (diff) | |
download | linux-dev-a7da4813429cf36abd042e6da72cc6641767d52f.tar.xz linux-dev-a7da4813429cf36abd042e6da72cc6641767d52f.zip |
Merge branch 'pm-cpuidle'
* pm-cpuidle:
drivers/cpuidle: make cpuidle-exynos.c explicitly non-modular
drivers/cpuidle: make cpuidle-ux500.c explicitly non-modular
drivers/cpuidle: make cpuidle-clps711x.c explicitly non-modular
cpuidle,menu: smooth out measured_us calculation
cpuidle,menu: use interactivity_req to disable polling
cpuidle,x86: increase forced cut-off for polling to 20us
Diffstat (limited to 'drivers/cpuidle/governors/menu.c')
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index 22e4463d1787..7b0971d97cc3 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c @@ -330,7 +330,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) * We want to default to C1 (hlt), not to busy polling * unless the timer is happening really really soon. */ - if (data->next_timer_us > 5 && + if (interactivity_req > 20 && !drv->states[CPUIDLE_DRIVER_STATE_START].disabled && dev->states_usage[CPUIDLE_DRIVER_STATE_START].disable == 0) data->last_state_idx = CPUIDLE_DRIVER_STATE_START; @@ -404,8 +404,10 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev) measured_us = cpuidle_get_last_residency(dev); /* Deduct exit latency */ - if (measured_us > target->exit_latency) + if (measured_us > 2 * target->exit_latency) measured_us -= target->exit_latency; + else + measured_us /= 2; /* Make sure our coefficients do not exceed unity */ if (measured_us > data->next_timer_us) |