[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181122155524.7wawdnuognnhyauj@queper01-lin>
Date: Thu, 22 Nov 2018 15:55:27 +0000
From: Quentin Perret <quentin.perret@....com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ingo Molnar <mingo@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Morten Rasmussen <morten.rasmussen@....com>,
Chris Redpath <chris.redpath@....com>,
Patrick Bellasi <patrick.bellasi@....com>,
Valentin Schneider <valentin.schneider@....com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Thara Gopinath <thara.gopinath@...aro.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Todd Kjos <tkjos@...gle.com>,
Joel Fernandes <joel@...lfernandes.org>,
Steve Muckle <smuckle@...gle.com>, adharmap@...eaurora.org,
Saravana Kannan <skannan@...eaurora.org>,
Pavan Kondeti <pkondeti@...eaurora.org>,
Juri Lelli <juri.lelli@...hat.com>,
Eduardo Valentin <edubezval@...il.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
currojerez@...eup.net, Javi Merino <javi.merino@...nel.org>
Subject: Re: [PATCH v9 09/15] sched: Introduce sched_energy_present static key
On Thursday 22 Nov 2018 at 16:51:41 (+0100), Rafael J. Wysocki wrote:
> On Thu, Nov 22, 2018 at 4:25 PM Quentin Perret <quentin.perret@....com> wrote:
> >
> > On Thursday 22 Nov 2018 at 11:25:45 (+0100), Peter Zijlstra wrote:
> > > On Thu, Nov 22, 2018 at 09:32:39AM +0000, Quentin Perret wrote:
> > > > Hmm, I went too fast, that's totally broken. But there's still something
> > > > we can do with static_branch_{inc,dec} I think. I'll come back later
> > > > with a better solution.
> > >
> > > Right; if you count the rd's that have pd set, it should work-ish. Yes,
> > > much cleaner if you can get it to work.
> >
> > So, I came up with the following code which seems to work OK. It's not
> > as I clean as I'd like, though. The fact that free_pd() can be called in
> > softirq context is annoying to manipulate the static key ...
> >
> > An alternative to this work item workaround is to do static_branch_dec()
> > from build_perf_domains() and next to the three call sites of
> > free_rootdomain() in order to avoid the call_rcu() context. Not very
> > pretty either.
> >
> > Or we can just stick with your original suggestion to carry a boolean
> > around.
>
> What's problematic with carrying a boolean around?
Nothing, I was just trying to see if I could find a more elegant way to
increment/decrement the static key as we create/destroy the perf
domains.
I would not describe the work item thing I came up with as particularly
elegant, though :-)
So, all in all, the boolean is fine by me if we all agree it is nicer.
Thanks,
Quentin
Powered by blists - more mailing lists