When select_idle_cpu starts scanning for an idle CPU, it starts with a target CPU that has already been checked by select_idle_sibling. This patch starts with the next CPU instead.
Unified · Split
| @@ -6220,7 +6220,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool · 6219 unmodified lines | |||
| 6220 | time = cpu_clock(this); | 6220 | time = cpu_clock(this); |
| 6221 | } | 6221 | } |
| 6222 | 6222 | ||
| 6223 | for_each_cpu_wrap(cpu, cpus, target) { | 6223 | for_each_cpu_wrap(cpu, cpus, target + 1) { |
| 6224 | if (has_idle_core) { | 6224 | if (has_idle_core) { |
| 6225 | i = select_idle_core(p, cpu, cpus, &idle_cpu); | 6225 | i = select_idle_core(p, cpu, cpus, &idle_cpu); |
| 6226 | if ((unsigned int)i < nr_cpumask_bits) | 6226 | if ((unsigned int)i < nr_cpumask_bits) |