diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e3088fa2256a..0e7a1bc655d5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6600,7 +6600,8 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy cpu = smp_processor_id(); if (sync && cpu_rq(cpu)->nr_running == 1 && - cpumask_test_cpu(cpu, p->cpus_ptr)) { + cpumask_test_cpu(cpu, p->cpus_ptr) && + task_fits_capacity(p, capacity_of(cpu))) { rcu_read_unlock(); return cpu; }