lkml.org 
[lkml]   [2020]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2020-06-24 14:29    [W:0.344 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site