diff options
author | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2013-08-14 12:02:34 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-22 18:24:15 -0400 |
commit | 330647a9501fe8f93a8ae9361417e51ee0bebd7e (patch) | |
tree | 45c364ac0efbe01caee7ee41ca9b6b5c5b25d029 /drivers/cpuidle/governors/menu.c | |
parent | 81455e72211e41972cca1d4686bc07b2e93b81e1 (diff) |
cpuidle: Ignore interval prediction result when timer is shorter
This patch prevents cpuidle menu governor from using repeating interval
prediction result if the idle period predicted is longer than the one
allowed by shortest running timer.
Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle/governors/menu.c')
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index cbbb73b37a6d..351697305fe7 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
@@ -238,10 +238,13 @@ again: | |||
238 | * | 238 | * |
239 | * The typical interval is obtained when standard deviation is small | 239 | * The typical interval is obtained when standard deviation is small |
240 | * or standard deviation is small compared to the average interval. | 240 | * or standard deviation is small compared to the average interval. |
241 | * | ||
242 | * Use this result only if there is no timer to wake us up sooner. | ||
241 | */ | 243 | */ |
242 | if (((avg > stddev * 6) && (divisor * 4 >= INTERVALS * 3)) | 244 | if (((avg > stddev * 6) && (divisor * 4 >= INTERVALS * 3)) |
243 | || stddev <= 20) { | 245 | || stddev <= 20) { |
244 | data->predicted_us = avg; | 246 | if (data->expected_us > avg) |
247 | data->predicted_us = avg; | ||
245 | return; | 248 | return; |
246 | 249 | ||
247 | } else if ((divisor * 4) > INTERVALS * 3) { | 250 | } else if ((divisor * 4) > INTERVALS * 3) { |