Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753259Ab2BTOlT (ORCPT ); Mon, 20 Feb 2012 09:41:19 -0500 Received: from casper.infradead.org ([85.118.1.10]:51847 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752205Ab2BTOlS convert rfc822-to-8bit (ORCPT ); Mon, 20 Feb 2012 09:41:18 -0500 Message-ID: <1329748861.2293.345.camel@twins> Subject: Re: sched: Avoid SMT siblings in select_idle_sibling() if possible From: Peter Zijlstra To: Mike Galbraith Cc: Suresh Siddha , linux-kernel , Ingo Molnar , Paul Turner , Srivatsa Vaddagiri Date: Mon, 20 Feb 2012 15:41:01 +0100 In-Reply-To: <1321629267.7080.13.camel@marge.simson.net> References: <1321350377.1421.55.camel@twins> <1321406062.16760.60.camel@sbsiddha-desk.sc.intel.com> <1321435455.5072.64.camel@marge.simson.net> <1321468646.11680.2.camel@sbsiddha-desk.sc.intel.com> <1321495153.5100.7.camel@marge.simson.net> <1321544313.6308.25.camel@marge.simson.net> <1321545376.2495.1.camel@laptop> <1321547917.6308.48.camel@marge.simson.net> <1321551381.15339.21.camel@sbsiddha-desk.sc.intel.com> <1321629267.7080.13.camel@marge.simson.net> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1573 Lines: 45 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. 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? Its not like this workload actually does anything concurrently. I was looking at this code due to vatsa wanting to do SD_BALANCE_WAKE. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/