From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753694AbbCBLxA (ORCPT ); Mon, 2 Mar 2015 06:53:00 -0500 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:57714 "EHLO e28smtp03.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753558AbbCBLw6 (ORCPT ); Mon, 2 Mar 2015 06:52:58 -0500 Date: Mon, 2 Mar 2015 17:22:49 +0530 From: Srikar Dronamraju To: Vincent Guittot Cc: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, preeti@linux.vnet.ibm.com, Morten.Rasmussen@arm.com, kamalesh@linux.vnet.ibm.com, riel@redhat.com, efault@gmx.de, nicolas.pitre@linaro.org, dietmar.eggemann@arm.com, linaro-kernel@lists.linaro.org Subject: Re: [PATCH v10 10/11] sched: add SD_PREFER_SIBLING for SMT level Message-ID: <20150302115249.GA9875@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <1425052454-25797-1-git-send-email-vincent.guittot@linaro.org> <1425052454-25797-11-git-send-email-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1425052454-25797-11-git-send-email-vincent.guittot@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15030211-0009-0000-0000-0000042CD622 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Vincent Guittot [2015-02-27 16:54:13]: > Add the SD_PREFER_SIBLING flag for SMT level in order to ensure that > the scheduler will put at least 1 task per core. > > Signed-off-by: Vincent Guittot > Reviewed-by: Preeti U. Murthy > --- > kernel/sched/core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 29f7037..753f0a2 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -6240,6 +6240,7 @@ sd_init(struct sched_domain_topology_level *tl, int cpu) > */ > > if (sd->flags & SD_SHARE_CPUCAPACITY) { > + sd->flags |= SD_PREFER_SIBLING; > sd->imbalance_pct = 110; > sd->smt_gain = 1178; /* ~15% */ > Prefer siblings logic dates back to https://lkml.org/lkml/2009/8/27/210 and only used in update_sd_lb_stats() where we have if (child && child->flags & SD_PREFER_SIBLING) prefer_sibling = 1; However what confuses me is why should we even look at a child domain's flag to balance tasks across the current sched domain? Why cant we just set and use a sd flag at current level than to look at child domain flag? > -- > 1.9.1 > > -- > 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/ -- Thanks and Regards Srikar Dronamraju