From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932906AbcGLOYr (ORCPT ); Tue, 12 Jul 2016 10:24:47 -0400 Received: from foss.arm.com ([217.140.101.70]:59555 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932585AbcGLOYp (ORCPT ); Tue, 12 Jul 2016 10:24:45 -0400 Date: Tue, 12 Jul 2016 15:26:13 +0100 From: Morten Rasmussen To: Peter Zijlstra Cc: mingo@redhat.com, dietmar.eggemann@arm.com, yuyang.du@intel.com, vincent.guittot@linaro.org, mgalbraith@suse.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 05/13] sched: Enable SD_BALANCE_WAKE for asymmetric capacity systems Message-ID: <20160712142612.GJ12540@e105550-lin.cambridge.arm.com> References: <1466615004-3503-1-git-send-email-morten.rasmussen@arm.com> <1466615004-3503-6-git-send-email-morten.rasmussen@arm.com> <20160711100449.GM30909@twins.programming.kicks-ass.net> <20160711103717.GF12540@e105550-lin.cambridge.arm.com> <20160711110458.GH12540@e105550-lin.cambridge.arm.com> <20160711112404.GJ30154@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160711112404.GJ30154@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 11, 2016 at 01:24:04PM +0200, Peter Zijlstra wrote: > On Mon, Jul 11, 2016 at 12:04:58PM +0100, Morten Rasmussen wrote: > > > One alternative to setting ASYM_CAP bottom up would be to set it only > > where the asymmetry can be observed, and instead come up with a more > > complicated way of setting BALANCE_WAKE bottom up until and including > > the first level having the ASYM_CAP. > > Right, that is what I was thinking. > > > I looked at it briefly an realized that I couldn't find a clean way of > > implementing it as I don't think we have visibility of which flags that > > will be set at higher levels in the sched_domain hierarchy when the > > lower levels are initialized. IOW, we have behavioural flags settings > > depend on topology flags settings at a different level. > > Looks doable if we pass @child into sd_init() in build_sched_domain(). > Then we could simply do: > > *sd = (struct sched_domain){ > /* ... */ > .child = child, > }; > > if (sd->flags & ASYM_CAP) { > struct sched_domain *t = sd; > while (t) { > t->sd_flags |= BALANCE_WAKE; > t = t->child; > } > } > > Or something like that. It appears to be working fine. I will roll it into v3 along with the simpler and more sane ASYM_CAP semantics :)