cpufreq: schedutil: fix check for stale utilization values

Part of the fix from commit d86ab9cff8 ("cpufreq: schedutil: use now
as reference when aggregating shared policy requests") is reversed in
commit 05d2ca2420 ("cpufreq: schedutil: Ignore CPU load older than
WALT window size") due to a porting mistake. Restore it while keeping
the relevant change from the latter patch.

Bug: 117438867
Test: build & boot
Change-Id: I21399be760d7c8e2fff6c158368a285dc6261647
Signed-off-by: Connor O'Brien <connoro@google.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
fourteen
Connor O'Brien 6 years ago committed by Jenna
parent 6b4eb85716
commit aa6676efa5
  1. 3
      kernel/sched/cpufreq_schedutil.c

@ -356,7 +356,6 @@ static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu, u64 time)
{ {
struct sugov_policy *sg_policy = sg_cpu->sg_policy; struct sugov_policy *sg_policy = sg_cpu->sg_policy;
struct cpufreq_policy *policy = sg_policy->policy; struct cpufreq_policy *policy = sg_policy->policy;
u64 last_freq_update_time = sg_policy->last_freq_update_time;
unsigned long util = 0, max = 1; unsigned long util = 0, max = 1;
unsigned int j; unsigned int j;
@ -372,7 +371,7 @@ static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu, u64 time)
* enough, don't take the CPU into account as it probably is * enough, don't take the CPU into account as it probably is
* idle now (and clear iowait_boost for it). * idle now (and clear iowait_boost for it).
*/ */
delta_ns = last_freq_update_time - j_sg_cpu->last_update; delta_ns = time - j_sg_cpu->last_update;
if (delta_ns > stale_ns) { if (delta_ns > stale_ns) {
j_sg_cpu->iowait_boost = 0; j_sg_cpu->iowait_boost = 0;
j_sg_cpu->iowait_boost_pending = false; j_sg_cpu->iowait_boost_pending = false;

Loading…
Cancel
Save