[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLZr6Dg0ON=RcZsH=Yd=+qdKNEuAgzOj6hu=f-y=7ngfw@mail.gmail.com>
Date: Wed, 10 Nov 2021 07:41:22 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
linux-kernel <linux-kernel@...r.kernel.org>, jpoimboe@...hat.com,
jbaron@...mai.com, rostedt@...dmis.org, ardb@...nel.org
Subject: Re: [PATCH 2/2] jump_label: refine placement of static_keys
On Wed, Nov 10, 2021 at 7:30 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
>
> Sure, I can make sure to include all cases. I was hoping
> DEFINE_STATIC_KEY_TRUE()/DEFINE_STATIC_KEY_FALSE()
> would catch the majority of uses.
>
> We also can add a new DEFINE_STATIC_KEY() macro to ease these cases.
Although use of 'struct static_key' is marked deprecated.
I guess that we can leave legacy uses be converted by maintainers if they care.
(They do not have to, __static_key section is only a hint, not a requirement)
For instance these ones had no __read_mostly and nobody cared.
arch/x86/kernel/paravirt.c:124:struct static_key paravirt_steal_enabled;
arch/x86/kernel/paravirt.c:125:struct static_key paravirt_steal_rq_enabled;
>
>
>
> >
> > Would something like:
> >
> > typedef struct static_key __static_key static_key_t;
> >
> > work? I forever seem to forget the exact things you can make a typedef
> > do :/
>
> I tried, but a typedef was not working. A macro would work.
Powered by blists - more mailing lists