From f2c3618a6435110fb162783080ee991ecc75b448 Mon Sep 17 00:00:00 2001 From: Shaleen Agrawal Date: Wed, 14 Jul 2021 13:36:47 -0700 Subject: [PATCH] sched: walt: use scale_cpu for energy evals Currently, when adjusting the max util with respect to current cluster frequency, we use capacity_orig_of as the multiplier. This is incorrect, because capacity_orig_of will change depending on the current max freq. Change-Id: Ifb38c46a8dc68d18458f6b683f0e8e66857a0644 Signed-off-by: Shaleen Agrawal --- kernel/sched/walt/walt_cfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/walt/walt_cfs.c b/kernel/sched/walt/walt_cfs.c index d7c86df25308..49918071d936 100644 --- a/kernel/sched/walt/walt_cfs.c +++ b/kernel/sched/walt/walt_cfs.c @@ -517,7 +517,7 @@ static inline unsigned long walt_em_cpu_energy(struct em_perf_domain *pd, max_util = max_util + (max_util >> 2); /* account for TARGET_LOAD usually 80 */ max_util = max(max_util, - (arch_scale_freq_capacity(cpu) * capacity_orig_of(cpu)) >> + (arch_scale_freq_capacity(cpu) * scale_cpu) >> SCHED_CAPACITY_SHIFT); /*