|
@@ -5239,6 +5239,10 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
|
|
|
int shallowest_idle_cpu = -1;
|
|
|
int i;
|
|
|
|
|
|
+ /* Check if we have any choice: */
|
|
|
+ if (group->group_weight == 1)
|
|
|
+ return cpumask_first(sched_group_cpus(group));
|
|
|
+
|
|
|
/* Traverse only the allowed CPUs */
|
|
|
for_each_cpu_and(i, sched_group_cpus(group), tsk_cpus_allowed(p)) {
|
|
|
if (idle_cpu(i)) {
|