Messages in this thread | | | Date | Wed, 24 Jun 2020 14:28:19 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH v2 2/2] sched/uclamp: Protect uclamp fast path code with static key |
| |
On Wed, Jun 24, 2020 at 09:34:02AM +0200, Patrick Bellasi wrote: > > +static DEFINE_STATIC_KEY_TRUE(sched_uclamp_unused); > > I would personally prefer a non negated semantic.
That's what I said earlier as well.
> > + */ > > + if (static_branch_likely(&sched_uclamp_unused)) > > + return; > > Moreover, something like: > > if (static_key_false(&sched_uclamp_enabled)) > return; > > is not just good enough?
static_key_true/false() are the deprecated API.
| |