lkml.org 
[lkml]   [2012]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sched: Avoid SMT siblings in select_idle_sibling() if possible
From
Date
On Mon, 2012-02-20 at 15:41 +0100, Peter Zijlstra wrote: 
> On Fri, 2011-11-18 at 16:14 +0100, Mike Galbraith wrote:
>
> > ---
> > kernel/sched_fair.c | 10 ++--------
> > 1 file changed, 2 insertions(+), 8 deletions(-)
> >
> > Index: linux-3.0-tip/kernel/sched_fair.c
> > ===================================================================
> > --- linux-3.0-tip.orig/kernel/sched_fair.c
> > +++ linux-3.0-tip/kernel/sched_fair.c
> > @@ -2276,17 +2276,11 @@ static int select_idle_sibling(struct ta
> > for_each_cpu_and(i, sched_domain_span(sd), tsk_cpus_allowed(p)) {
> > if (idle_cpu(i)) {
> > target = i;
> > + if (sd->flags & SD_SHARE_CPUPOWER)
> > + continue;
> > break;
> > }
> > }
> > -
> > - /*
> > - * Lets stop looking for an idle sibling when we reached
> > - * the domain that spans the current cpu and prev_cpu.
> > - */
> > - if (cpumask_test_cpu(cpu, sched_domain_span(sd)) &&
> > - cpumask_test_cpu(prev_cpu, sched_domain_span(sd)))
> > - break;
> > }
> > rcu_read_unlock();
>
> Mike, Suresh, did we ever get this sorted? I was looking at
> select_idle_sibling() and it looks like we dropped this.

I thought this was pretty much sorted. We want to prefer core over
sibling, because on at laest some modern CPUs with L3, siblings suck
rocks.

> Also, did anybody ever get an answer from a HW guy on why sharing stuff
> over SMT threads is so much worse than sharing it over proper cores?

No. My numbers on westmere indicated to me that siblings do not share
L2, making them fairly worthless. Hard facts we never got.

> Its
> not like this workload actually does anything concurrently.
>
> I was looking at this code due to vatsa wanting to do SD_BALANCE_WAKE.

I really really need to find time to do systematic mainline testing.

Enabling SD_BALANCE_WAKE used to be decidedly too expensive to consider.
Maybe that has changed, but I doubt it. (general aside: testing with a
bloated distro config is a big mistake)

-Mike



\
 
 \ /
  Last update: 2012-02-20 19:17    [W:0.775 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site