diff options
Diffstat (limited to 'kernel/sched/cpufreq_schedutil.c')
-rw-r--r-- | kernel/sched/cpufreq_schedutil.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 76877a62b5fa..622eed1b7658 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c | |||
@@ -245,11 +245,10 @@ static void sugov_update_single(struct update_util_data *hook, u64 time, | |||
245 | sugov_update_commit(sg_policy, time, next_f); | 245 | sugov_update_commit(sg_policy, time, next_f); |
246 | } | 246 | } |
247 | 247 | ||
248 | static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu) | 248 | static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu, u64 time) |
249 | { | 249 | { |
250 | struct sugov_policy *sg_policy = sg_cpu->sg_policy; | 250 | struct sugov_policy *sg_policy = sg_cpu->sg_policy; |
251 | struct cpufreq_policy *policy = sg_policy->policy; | 251 | struct cpufreq_policy *policy = sg_policy->policy; |
252 | u64 last_freq_update_time = sg_policy->last_freq_update_time; | ||
253 | unsigned long util = 0, max = 1; | 252 | unsigned long util = 0, max = 1; |
254 | unsigned int j; | 253 | unsigned int j; |
255 | 254 | ||
@@ -265,7 +264,7 @@ static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu) | |||
265 | * enough, don't take the CPU into account as it probably is | 264 | * enough, don't take the CPU into account as it probably is |
266 | * idle now (and clear iowait_boost for it). | 265 | * idle now (and clear iowait_boost for it). |
267 | */ | 266 | */ |
268 | delta_ns = last_freq_update_time - j_sg_cpu->last_update; | 267 | delta_ns = time - j_sg_cpu->last_update; |
269 | if (delta_ns > TICK_NSEC) { | 268 | if (delta_ns > TICK_NSEC) { |
270 | j_sg_cpu->iowait_boost = 0; | 269 | j_sg_cpu->iowait_boost = 0; |
271 | continue; | 270 | continue; |
@@ -309,7 +308,7 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time, | |||
309 | if (flags & SCHED_CPUFREQ_RT_DL) | 308 | if (flags & SCHED_CPUFREQ_RT_DL) |
310 | next_f = sg_policy->policy->cpuinfo.max_freq; | 309 | next_f = sg_policy->policy->cpuinfo.max_freq; |
311 | else | 310 | else |
312 | next_f = sugov_next_freq_shared(sg_cpu); | 311 | next_f = sugov_next_freq_shared(sg_cpu, time); |
313 | 312 | ||
314 | sugov_update_commit(sg_policy, time, next_f); | 313 | sugov_update_commit(sg_policy, time, next_f); |
315 | } | 314 | } |