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