Messages in this thread | | | Subject | Re: [PATCH RESEND] sched: prefer an idle cpu vs an idle sibling for BALANCE_WAKE | From | Mike Galbraith <> | Date | Sat, 30 May 2015 05:55:49 +0200 |
| |
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
| |