[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+RNj0gaJCyNUyrMBpSTsxSgjW1YN_FuRW_pMUOMiQtuQ@mail.gmail.com>
Date: Mon, 5 Dec 2022 14:23:07 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Uladzislau Rezki <urezki@...il.com>
Cc: paulmck@...nel.org, "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
eric.dumazet@...il.com, Dmitry Safonov <dima@...sta.com>,
rcu@...r.kernel.org
Subject: Re: [PATCH net-next] tcp: use 2-arg optimal variant of kfree_rcu()
On Mon, Dec 5, 2022 at 12:09 PM Uladzislau Rezki <urezki@...il.com> wrote:
>
> Hello, Eric.
>
> > +rcu for archives
> >
> > > On Dec 2, 2022, at 7:16 PM, Joel Fernandes <joel@...lfernandes.org> wrote:
> > >
> > > On Sat, Dec 3, 2022 at 12:12 AM Joel Fernandes <joel@...lfernandes.org> wrote:
> > >>
> > >>> On Sat, Dec 3, 2022 at 12:03 AM Paul E. McKenney <paulmck@...nel.org> wrote:
> > >>>
> > >>> On Fri, Dec 02, 2022 at 11:49:59PM +0000, Joel Fernandes wrote:
> > >>>> On Fri, Dec 02, 2022 at 05:28:47AM +0000, Eric Dumazet wrote:
> > >>>>> kfree_rcu(1-arg) should be avoided as much as possible,
> > >>>>> since this is only possible from sleepable contexts,
> > >>>>> and incurr extra rcu barriers.
> > >>>>>
> > >>>>> I wish the 1-arg variant of kfree_rcu() would
> > >>>>> get a distinct name, like kfree_rcu_slow()
> > >>>>> to avoid it being abused.
> >
> <snip>
> tcp: use 2-arg optimal variant of kfree_rcu()
> Date: Fri, 2 Dec 2022 05:28:47 +0000 [thread overview]
> Message-ID: <20221202052847.2623997-1-edumazet@...gle.com> (raw)
>
> kfree_rcu(1-arg) should be avoided as much as possible,
> since this is only possible from sleepable contexts,
> and incurr extra rcu barriers.
>
> I wish the 1-arg variant of kfree_rcu() would
> get a distinct name, like kfree_rcu_slow()
> to avoid it being abused.
>
> Fixes: 459837b522f7 ("net/tcp: Disable TCP-MD5 static key on tcp_md5sig_info destruction")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Dmitry Safonov <dima@...sta.com>
> Cc: Paul E. McKenney <paulmck@...nel.org>
> <snip>
>
> Could you please clarify a little bit about why/how have you came
> up with a patch that you posted with "Fixes" tag? I mean you run
> into:
> - performance degrade;
> - simple typo;
> - etc.
Bug was added in the blamed commit, we use Fixes: tag to clearly
identify bug origin.
tcp_md5_key_copy() is called from softirq context, there is no way it
could sleep in synchronize_rcu()
Powered by blists - more mailing lists