From c79c75585329adf3c4a386bfcf7112bee5ec81cb Mon Sep 17 00:00:00 2001 From: Shaleen Agrawal Date: Tue, 20 Apr 2021 14:25:17 -0700 Subject: [PATCH] sched: walt: Shift boost status of current task We check if the current task running on the CPU has the highest per task boost to avoid placing task on said CPU. However, if the CPU is idle, then this check becomes unnecessary. Change-Id: I257df862ee2b344c0c602f36f254b38f61b78e55 Signed-off-by: Shaleen Agrawal --- kernel/sched/walt/walt_cfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/sched/walt/walt_cfs.c b/kernel/sched/walt/walt_cfs.c index 20cd6e800d69..5763afd50514 100644 --- a/kernel/sched/walt/walt_cfs.c +++ b/kernel/sched/walt/walt_cfs.c @@ -250,10 +250,6 @@ static void walt_find_best_target(struct sched_domain *sd, most_spare_cap_cpu = i; } - if (per_task_boost(cpu_rq(i)->curr) == - TASK_BOOST_STRICT_MAX) - continue; - /* * Ensure minimum capacity to grant the required boost. * The target CPU can be already at a capacity level higher @@ -306,6 +302,10 @@ static void walt_find_best_target(struct sched_domain *sd, continue; } + if (per_task_boost(cpu_rq(i)->curr) == + TASK_BOOST_STRICT_MAX) + continue; + /* * Compute the maximum possible capacity we expect * to have available on this CPU once the task is