mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
cpufreq: schedutil: fix CPU util when WALT is enabled
Right now, when WALT is enabled, we always end up using utilization from WALT which is broken as we need to consider uclamp as well. Fix the issue by taking uclamp into account. Change-Id: Ie1a06d270a176771fc1c9a2474a27327637fa782 Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
59d3346dd2
commit
8f8f9811c9
1 changed files with 6 additions and 6 deletions
|
|
@ -390,17 +390,17 @@ static unsigned long sugov_get_util(struct sugov_cpu *sg_cpu)
|
|||
{
|
||||
struct rq *rq = cpu_rq(sg_cpu->cpu);
|
||||
unsigned long max = arch_scale_cpu_capacity(sg_cpu->cpu);
|
||||
unsigned long util;
|
||||
|
||||
sg_cpu->max = max;
|
||||
sg_cpu->bw_dl = cpu_bw_dl(rq);
|
||||
|
||||
#ifdef CONFIG_SCHED_WALT
|
||||
util = cpu_util_freq(sg_cpu->cpu, &sg_cpu->walt_load);
|
||||
|
||||
sg_cpu->max = max;
|
||||
sg_cpu->bw_dl = cpu_bw_dl(rq);
|
||||
|
||||
return cpu_util_freq(sg_cpu->cpu, &sg_cpu->walt_load);
|
||||
return uclamp_util(rq, util);
|
||||
#else
|
||||
unsigned long util = cpu_util_freq(sg_cpu->cpu, NULL) + cpu_util_rt(rq);
|
||||
|
||||
sg_cpu->max = max;
|
||||
sg_cpu->bw_dl = cpu_bw_dl(rq);
|
||||
util = cpu_util_freq(sg_cpu->cpu, NULL) + cpu_util_rt(rq);
|
||||
|
||||
return schedutil_cpu_util(sg_cpu->cpu, util, max, FREQUENCY_UTIL, NULL);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue