From 7ca8c215a8ec46e0a9fdc879c9eb05e6768e3a8d Mon Sep 17 00:00:00 2001 From: Diep Quynh Date: Thu, 7 Jan 2021 14:46:29 +0700 Subject: [PATCH] sched: fair: Fix load balancing for big tasks cpu_capacity() returns maximum capacity when WALT is disabled, hence we couldn't take advantage of CAF's optimization Return CPU's original capacity instead to make it usable Change-Id: I524f9f1872f038c0b77ba404b1caf0ce75321dd8 Signed-off-by: Diep Quynh Signed-off-by: Alexander Winkowski --- kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 86d6905d507b..0e6f3df3da42 100755 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -3079,7 +3079,7 @@ static inline bool is_min_capacity_cpu(int cpu) #ifdef CONFIG_SMP static inline int cpu_capacity(int cpu) { - return SCHED_CAPACITY_SCALE; + return capacity_orig_of(cpu); } #endif