lkml.org 
[lkml]   [2018]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v9 09/15] sched: Introduce sched_energy_present static key
On Thu, Nov 22, 2018 at 4:25 PM Quentin Perret <quentin.perret@arm.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?

\
 
 \ /
  Last update: 2018-11-22 16:52    [W:0.080 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site