From: Peter Zijlstra <peterz@infradead.org>
To: Morten Rasmussen <morten.rasmussen@foss.arm.com>
Cc: Morten Rasmussen <morten.rasmussen@arm.com>,
mingo@redhat.com, valentin.schneider@arm.com,
dietmar.eggemann@arm.com, vincent.guittot@linaro.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] sched: Add static_key for asymmetric cpu capacity optimizations
Date: Fri, 16 Feb 2018 17:51:23 +0100 [thread overview]
Message-ID: <20180216165123.GH25201@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20180216154101.GE28799@e105550-lin.cambridge.arm.com>
On Fri, Feb 16, 2018 at 03:41:01PM +0000, Morten Rasmussen wrote:
> On Fri, Feb 16, 2018 at 02:47:04PM +0100, Peter Zijlstra wrote:
> > On Thu, Feb 15, 2018 at 04:20:48PM +0000, Morten Rasmussen wrote:
> > > +static void update_asym_cpucapacity(int cpu)
> > > +{
> > > + if (!static_branch_unlikely(&sched_asym_cpucapacity) &&
> > > + lowest_flag_domain(cpu, SD_ASYM_CPUCAPACITY))
> > > + static_branch_enable(&sched_asym_cpucapacity);
> > > +}
> >
> > That looks odd, why not just:
> >
> > if (lowest_flag_domain(cpu, SD_ASYM_CPUCAPACITY))
> > static_branch_enable(&sched_asym_cpucapacity);
>
> I actually had that initially and then I misread the implementation of
> static_key_enable() as if it trigger the WARN_ON_ONCE() condition if I
> enable an already enabled static key. But I see now that it should be
> safe to do.
Right, that WARN is there for when we use enable/disable on a key with a
value outside of [0,1].
> > ? possibly with:
> >
> > else
> > static_branch_disable(&sched_asym_cpucapacity);
> >
> > if you want to play funny games :-)
>
> I thought about that too. It could make certain hotplug scenarios even
> more expensive. I think we want the sched_asym_cpucapacity code to behave
> even if SD_ASYM_CPUCAPACITY isn't set anywhere, so the static key would
> be permanently from the point we detect asymmetry and leave it set. This
> would be in line with how the smt static key works.
Fair enough..
next prev parent reply other threads:[~2018-02-16 16:51 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 16:20 [PATCH 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems Morten Rasmussen
2018-02-15 16:20 ` [PATCH 1/7] sched: Add static_key for asymmetric cpu capacity optimizations Morten Rasmussen
2018-02-16 13:47 ` Peter Zijlstra
2018-02-16 15:41 ` Morten Rasmussen
2018-02-16 16:51 ` Peter Zijlstra [this message]
2018-02-19 11:49 ` Morten Rasmussen
2018-02-16 17:39 ` Quentin Perret
2018-02-16 17:43 ` Peter Zijlstra
2018-02-15 16:20 ` [PATCH 2/7] sched/fair: Add group_misfit_task load-balance type Morten Rasmussen
2018-02-19 13:56 ` Peter Zijlstra
2018-02-19 13:58 ` Peter Zijlstra
2018-02-20 16:01 ` Morten Rasmussen
2018-02-15 16:20 ` [PATCH 3/7] sched/fair: Consider misfit tasks when load-balancing Morten Rasmussen
2018-02-15 16:20 ` [PATCH 4/7] sched/fair: Avoid unnecessary balancing of asymmetric capacity groups Morten Rasmussen
2018-02-19 14:50 ` Peter Zijlstra
2018-02-19 14:53 ` Peter Zijlstra
2018-02-20 16:22 ` Morten Rasmussen
2018-02-19 15:10 ` Peter Zijlstra
2018-02-20 16:33 ` Morten Rasmussen
2018-02-20 18:26 ` Peter Zijlstra
2018-02-23 16:38 ` Morten Rasmussen
2018-02-23 16:47 ` Peter Zijlstra
2018-02-26 15:06 ` Morten Rasmussen
2018-02-15 16:20 ` [PATCH 5/7] sched/fair: Kick nohz balance if rq->misfit_task Morten Rasmussen
2018-02-15 16:20 ` [PATCH 6/7] sched: Rename root_domain->overload to should_idle_balance Morten Rasmussen
2018-02-16 9:14 ` Juri Lelli
2018-02-16 9:49 ` Peter Zijlstra
2018-02-16 11:59 ` Valentin Schneider
2018-02-15 16:20 ` [PATCH 7/7] sched/fair: Set sd->should_idle_balance when misfit Morten Rasmussen
2018-02-28 7:46 ` [PATCH 0/7] sched/fair: Migrate 'misfit' tasks on asymmetric capacity systems Gaku Inami
2018-03-01 11:59 ` Valentin Schneider
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180216165123.GH25201@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=morten.rasmussen@foss.arm.com \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox