提交 330647a9 编写于 作者: T Tuukka Tikkanen 提交者: Rafael J. Wysocki

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: NTuukka Tikkanen <tuukka.tikkanen@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 81455e72
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册