aboutsummaryrefslogtreecommitdiff
path: root/samples/kfifo
diff options
context:
space:
mode:
authorRafael J. Wysocki2019-11-13 01:03:24 +0100
committerRafael J. Wysocki2019-11-13 22:31:17 +0100
commit63f202e5edf161c2ccffa286a9a701e995427b15 (patch)
treea514cefb2b7beb768ed0ae3c1032f0b5bddfd5f9 /samples/kfifo
parentb6495b7f004d01b9ecf9ed5fd31368241d3c5589 (diff)
cpuidle: teo: Avoid using "early hits" incorrectly
If the current state with the maximum "early hits" metric in teo_select() is also the one "matching" the expected idle duration, it will be used as the candidate one for selection even if its "misses" metric is greater than its "hits" metric, which is not correct. In that case, the candidate state should be shallower than the current one and its "early hits" metric should be the maximum among the idle states shallower than the current one. To make that happen, modify teo_select() to save the index of the state whose "early hits" metric is the maximum for the range of states below the current one and go back to that state if it turns out that the current one should be rejected. Fixes: 159e48560f51 ("cpuidle: teo: Fix "early hits" handling for disabled idle states") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'samples/kfifo')
0 files changed, 0 insertions, 0 deletions