[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1321435455.5072.64.camel@marge.simson.net>
Date: Wed, 16 Nov 2011 10:24:15 +0100
From: Mike Galbraith <efault@....de>
To: Suresh Siddha <suresh.b.siddha@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>, Paul Turner <pjt@...gle.com>
Subject: Re: sched: Avoid SMT siblings in select_idle_sibling() if possible
On Tue, 2011-11-15 at 17:14 -0800, Suresh Siddha wrote:
> How about this patch which is more self explanatory?
Actually, after further testing/reading, it looks to me like both of
these patches have a problem. They'll never select SMT siblings (so a
skip SIBLING should accomplish the same).
This patch didn't select an idle core either though, where Peter's did.
Tested by pinning a hog to cores 1-3, then starting up an unpinned
tbench pair. Peter's patch didn't do the BadThing (as in bad for
TCP_RR/tbench) in that case, but should have.
> + 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 (!idle_cpu(i))
> + goto next;
Say target is CPU0. Groups are 0,4 1,5 2,6 3,7. 0-3 are first CPUs
encountered in MC groups, all were busy. At SIBLING level, the only
group is 0,4. First encountered CPU of sole group is busy target, so
we're done.. so we return busy target.
> + target = cpumask_first_and(sched_group_cpus(sg),
> + tsk_cpus_allowed(p));
At SIBLING, group = 0,4 = 0x5, 0x5 & 0xff = 1 = target.
-Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists