diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 0b1615d223fe..eabf7f1e646f 100755 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7761,11 +7761,13 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu, continue; } +#ifdef CONFIG_SCHED_WALT /* * Consider only idle CPUs for active migration. */ if (p->state == TASK_RUNNING) continue; +#endif /* * Case C) Non latency sensitive tasks on ACTIVE CPUs. @@ -7884,10 +7886,12 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu, ? best_active_cpu : best_idle_cpu; +#ifdef CONFIG_SCHED_WALT if (target_cpu == -1 && most_spare_cap_cpu != -1 && /* ensure we use active cpu for active migration */ !(p->state == TASK_RUNNING && !idle_cpu(most_spare_cap_cpu))) target_cpu = most_spare_cap_cpu; +#endif trace_sched_find_best_target(p, prefer_idle, min_util, cpu, best_idle_cpu, best_active_cpu,