Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 330647a9 authored by Tuukka Tikkanen's avatar Tuukka Tikkanen Committed by Rafael J. Wysocki
Browse files

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: default avatarTuukka Tikkanen <tuukka.tikkanen@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 81455e72
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -238,9 +238,12 @@ 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) {
		if (data->expected_us > avg)
			data->predicted_us = avg;
		return;