netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	Florian Westphal <fw@strlen.de>,
	netfilter-devel@vger.kernel.org, netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net] netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant
Date: Tue, 22 Feb 2022 20:46:05 +0100	[thread overview]
Message-ID: <20220222194605.GA28705@breakpoint.cc> (raw)
In-Reply-To: <20220222181331.811085-1-eric.dumazet@gmail.com>

Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> While kfree_rcu(ptr) _is_ supported, it has some limitations.
> 
> Given that 99.99% of kfree_rcu() users [1] use the legacy
> two parameters variant, and @catchall objects do have an rcu head,
> simply use it.
> 
> Choice of kfree_rcu(ptr) variant was probably not intentional.

In case someone wondered, this causes expensive
sycnhronize_rcu + kfree for each removal operation.

Reviewed-by: Florian Westphal <fw@strlen.de>


  reply	other threads:[~2022-02-22 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 18:13 [PATCH net] netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant Eric Dumazet
2022-02-22 19:46 ` Florian Westphal [this message]
2022-02-22 20:07   ` Eric Dumazet
2022-02-23  8:22     ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220222194605.GA28705@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).