diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index cbbb73b37a6d1d0d99a9d4613633324ef0833219..351697305fe7a25d895bc31d68a68a1232679ad5 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c @@ -238,10 +238,13 @@ static void get_typical_interval(struct menu_device *data) * * The typical interval is obtained when standard deviation is small * or standard deviation is small compared to the average interval. + * + * Use this result only if there is no timer to wake us up sooner. */ if (((avg > stddev * 6) && (divisor * 4 >= INTERVALS * 3)) || stddev <= 20) { - data->predicted_us = avg; + if (data->expected_us > avg) + data->predicted_us = avg; return; } else if ((divisor * 4) > INTERVALS * 3) {