]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netfilter: conntrack: expedite rcu in nf_conntrack_cleanup_net_list
authorEric Dumazet <edumazet@google.com>
Fri, 9 Feb 2024 15:31:01 +0000 (15:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Feb 2024 12:17:03 +0000 (12:17 +0000)
commit1ebb85f9c03de0b66c334de219f224159e24e549
tree4dc5ebc60fcc3e6bdfa134b20016b41b5c6fa3b1
parent78c3253f27e579f7f3a1f5c0cb8266693a7b4f41
netfilter: conntrack: expedite rcu in nf_conntrack_cleanup_net_list

nf_conntrack_cleanup_net_list() is calling synchronize_net()
while RTNL is not held. This effectively calls synchronize_rcu().

synchronize_rcu() is much slower than synchronize_rcu_expedited(),
and cleanup_net() is currently single threaded. In many workloads
we want cleanup_net() to be faster, in order to free memory and various
sysfs and procfs entries as fast as possible.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_conntrack_core.c