diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c28eb90aa50f..421bf8986b71 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6591,8 +6591,10 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus, most_spare_wake_cap = LONG_MIN; } - if (fbt_env->strict_max) - target_max_spare_cap = LONG_MIN; + if (fbt_env->strict_max) { + stop_index = 0; + most_spare_wake_cap = LONG_MIN; + } if (p->state == TASK_RUNNING) most_spare_wake_cap = ULONG_MAX; @@ -6656,9 +6658,8 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus, most_spare_cap_cpu = i; } - if ((per_task_boost(cpu_rq(i)->curr) == - TASK_BOOST_STRICT_MAX) && - !fbt_env->strict_max) + if (per_task_boost(cpu_rq(i)->curr) == + TASK_BOOST_STRICT_MAX) continue; /* * Cumulative demand may already be accounting for the @@ -6677,7 +6678,7 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus, * than the one required to boost the task. */ new_util = max(min_util, new_util); - if (!fbt_env->strict_max && new_util > capacity_orig) + if (new_util > capacity_orig) continue; /*