Commit 069ce2ef authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

cpuidle: teo: Ignore disabled idle states that are too deep

Prevent disabled CPU idle state with target residencies beyond the
anticipated idle duration from being taken into account by the TEO
governor.

Fixes: b26bf6ab ("cpuidle: New timer events oriented governor for tickless systems")
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 5.1+ <stable@vger.kernel.org> # 5.1+
parent 4f5cafb5
......@@ -257,6 +257,13 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
struct cpuidle_state_usage *su = &dev->states_usage[i];
if (s->disabled || su->disable) {
/*
* Ignore disabled states with target residencies beyond
* the anticipated idle duration.
*/
if (s->target_residency > duration_us)
continue;
/*
* If the "early hits" metric of a disabled state is
* greater than the current maximum, it should be taken
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment