[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iK72b5bSjq0MeedXJ5Onk22Pnw6cjNr0cAYP_-hv8RhAQ@mail.gmail.com>
Date: Wed, 7 Jan 2026 22:17:52 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>, "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, netdev <netdev@...r.kernel.org>,
Christophe Leroy <christophe.leroy@...roup.eu>, Willy Tarreau <w@....eu>,
Reinette Chatre <reinette.chatre@...el.com>
Subject: Re: [PATCH net-next] once: add DO_ONCE_SLOW() for sleepable contexts
On Wed, Jan 7, 2026 at 9:59 PM Luck, Tony <tony.luck@...el.com> wrote:
>
> On Sat, Oct 01, 2022 at 01:51:02PM -0700, Eric Dumazet wrote:
> > +void __do_once_slow_done(bool *done, struct static_key_true *once_key,
> > + struct module *mod)
> > + __releases(once_mutex)
> > +{
> > + *done = true;
> > + mutex_unlock(&once_mutex);
> > + once_disable_jump(once_key, mod);
>
> This seems to have been cut & pasted from __do_once_done(). But is there
> a reason for the "sleepable" version to defer resetting the static key
> in a work queue? Can't we just inline do:
>
> BUG_ON(!static_key_enabled(once_key));
> static_branch_disable(once_key);
>
> > +}
>
> -Tony
>
> Credit to Reinette for raising this question. Blame me if I didn't spot
> why a work queue is needed.
Note this is used from one single place, one time...
Why would you care ?
Powered by blists - more mailing lists