diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 0403d3a9d4c1..2ce67bff67a3 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3979,7 +3979,6 @@ static inline bool task_fits_max(struct task_struct *p, int cpu) if (is_min_capacity_cpu(cpu)) { if (task_boost_policy(p) == SCHED_BOOST_ON_BIG || task_boost > 0 || - schedtune_task_boost(p) > 0 || walt_should_kick_upmigrate(p, cpu)) return false; } else { /* mid cap cpu */ @@ -7421,6 +7420,11 @@ static void find_best_target(struct sched_domain *sd, cpumask_t *cpus, } while (sg = sg->next, sg != start_sd->groups); + if (prefer_idle && (best_idle_cpu != -1)) { + target_cpu = best_idle_cpu; + goto target; + } + adjust_cpus_for_packing(p, &target_cpu, &best_idle_cpu, shallowest_idle_cstate, fbt_env, boosted); @@ -7446,11 +7450,6 @@ static void find_best_target(struct sched_domain *sd, cpumask_t *cpus, * b) IDLE CPU: best_idle_cpu */ - if (prefer_idle && (best_idle_cpu != -1)) { - target_cpu = best_idle_cpu; - goto target; - } - if (target_cpu == -1) target_cpu = prefer_idle ? best_active_cpu