diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7777ea6a6b9b..68bbb5f0e6f0 100755 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7372,8 +7372,7 @@ 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) + task_boost > 0) return false; } else { /* mid cap cpu */ if (task_boost > 1) @@ -7891,6 +7890,14 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu, } while (sg = sg->next, sg != sd->groups); + if (prefer_idle && (best_idle_cpu != -1)) { + trace_sched_find_best_target(p, prefer_idle, min_util, cpu, + best_idle_cpu, best_active_cpu, + -1, best_idle_cpu, -1); + + return best_idle_cpu; + } + if (best_idle_cpu != -1 && !is_packing_eligible(p, target_cpu, fbt_env, active_cpus_count, best_idle_cstate, boosted)) { @@ -7919,14 +7926,6 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu, * b) IDLE CPU: best_idle_cpu */ - if (prefer_idle && (best_idle_cpu != -1)) { - trace_sched_find_best_target(p, prefer_idle, min_util, cpu, - best_idle_cpu, best_active_cpu, - -1, best_idle_cpu, -1); - - return best_idle_cpu; - } - if (target_cpu == -1) target_cpu = prefer_idle ? best_active_cpu