mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
cpuidle: teo: Ignore disabled idle states that are too deep
commit 069ce2ef1a6dd84cbd4d897b333e30f825e021f0 upstream.
Prevent disabled CPU idle state with target residencies beyond the
anticipated idle duration from being taken into account by the TEO
governor.
Fixes: b26bf6ab71 ("cpuidle: New timer events oriented governor for tickless systems")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 5.1+ <stable@vger.kernel.org> # 5.1+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
768cfe8321
commit
b327b673c5
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue