All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 net-next 0/5] ip: Batch flushing uncached routes for dying netns.
@ 2026-09-27 20:23 Kuniyuki Iwashima
  2026-09-27 20:23 ` [PATCH v1 net-next 1/5] net: Remove net->is_dying Kuniyuki Iwashima
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Kuniyuki Iwashima @ 2026-09-27 20:23 UTC (permalink / raw)
  To: David Ahern, Ido Schimmel, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Chris J Arges, Kuniyuki Iwashima, Kuniyuki Iwashima,
	netdev

Chris J Arges reported high RTNL contention during cleanup_net()
caused by rt_flush_dev() and rt6_uncached_list_flush_dev() iterating
over the global per-cpu uncached route lists for every netdev in
dying netns [0].

This series resolves the issue by introducing a new ->pre_exit_batch()
hook in struct pernet_operations and batching the uncached route
cleanup once per cleanup_net() without holding RTNL.

[0]: https://lore.kernel.org/netdev/20260917-hash-bucket-route-lists-v3-0-30493a37b6eb@cloudflare.com/


Kuniyuki Iwashima (5):
  net: Remove net->is_dying.
  net: Add ->pre_exit_batch() to struct pernet_operations.
  net: Track state in ops_undo_list().
  ipv4: Batch rt_flush_dev() for dying netns.
  ipv6: Batch rt6_uncached_list_flush_dev() for dying netns.

 include/net/net_namespace.h | 11 +++++++-
 net/core/net_namespace.c    | 13 +++++++--
 net/ipv4/fib_frontend.c     |  6 +++++
 net/ipv4/route.c            | 28 +++++++++++++++----
 net/ipv6/route.c            | 54 ++++++++++++++++++++++++++-----------
 5 files changed, 89 insertions(+), 23 deletions(-)

-- 
2.56.0.rc1.315.gc6ed9934b7-goog


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-09-29  6:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-27 20:23 [PATCH v1 net-next 0/5] ip: Batch flushing uncached routes for dying netns Kuniyuki Iwashima
2026-09-27 20:23 ` [PATCH v1 net-next 1/5] net: Remove net->is_dying Kuniyuki Iwashima
2026-09-29  6:26   ` netdev-bot+sashiko
2026-09-27 20:23 ` [PATCH v1 net-next 2/5] net: Add ->pre_exit_batch() to struct pernet_operations Kuniyuki Iwashima
2026-09-29  6:26   ` netdev-bot+sashiko
2026-09-27 20:23 ` [PATCH v1 net-next 3/5] net: Track state in ops_undo_list() Kuniyuki Iwashima
2026-09-27 20:23 ` [PATCH v1 net-next 4/5] ipv4: Batch rt_flush_dev() for dying netns Kuniyuki Iwashima
2026-09-27 22:51   ` Eric Dumazet
2026-09-28 16:33     ` Kuniyuki Iwashima
2026-09-29  6:26   ` netdev-bot+sashiko
2026-09-27 20:23 ` [PATCH v1 net-next 5/5] ipv6: Batch rt6_uncached_list_flush_dev() " Kuniyuki Iwashima
2026-09-29  6:26   ` netdev-bot+sashiko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.