lkml.org 
[lkml]   [2015]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RESEND] sched: prefer an idle cpu vs an idle sibling for BALANCE_WAKE
From
Date
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



\
 
 \ /
  Last update: 2015-05-30 06:01    [W:0.144 / U:15.008 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site