On Fri, 2015-05-29 at 17:03 -0400, Josef Bacik wrote: > for_each_lower_domain(sd) { > sg = sd->groups; > do { > if (!cpumask_intersects(sched_group_cpus(sg), > tsk_cpus_allowed(p))) > goto next; > > for_each_cpu(i, sched_group_cpus(sg)) { > if (i == target || !idle_cpu(i)) > goto next; > } > > return cpumask_first_and(sched_group_cpus(sg), > tsk_cpus_allowed(p)); > next: > sg = sg->next > } while (sg != sd->groups); > } > > We get all the schedule groups for the schedule domain and if any of the > cpu's are not idle or the target then we skip the whole scheduling > group. Isn't the scheduling group a group of CPU's? Why can't we pick > an idle CPU in the group that has a none idle cpu or the target cpu? > Thanks,
We select an idle core if we can get one. Yes, that leaves a pile of SMT threads not checked/selected, but if you're gonna do a full search of a large socket (humongous sparc-thing, shudder), you may as well eat the BALANCE_WAKE overhead. -Mike -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/