All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/6] ip: Batch flushing uncached routes per batched device unregistration.
@ 2026-10-01 20:47 Kuniyuki Iwashima
  2026-10-01 20:47 ` [PATCH v3 net-next 1/6] net: Order blackhole_netdev_init(), inet_init(), and inet6_init() Kuniyuki Iwashima
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-01 20:47 UTC (permalink / raw)
  To: David Ahern, Ido Schimmel, Andrew Lunn, 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 batching the uncached route
cleanup after __rtnl_unlock() in netdev_run_todo()

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


Changelog:
  v3:
    * Add patch 1 ~ 4
    * Patch 6
      * Unlink routes only when both devices are blackhole_netdev
      * Clarify netdev_run_todo() does not run before
        rt6_uncached_list is initialised
      * Fix CONFIG_IPV6=n build

  v2: https://lore.kernel.org/netdev/20260929201546.1533268-1-kuniyu@google.com/
    * Drop ->pre_exit_batch()
    * Do batching after setting NETDEV_UNREGISTERED in netdev_run_todo()

  v1: https://lore.kernel.org/netdev/20260927202429.2452589-1-kuniyu@google.com/


Kuniyuki Iwashima (6):
  net: Order blackhole_netdev_init(), inet_init(), and inet6_init().
  ipv4: Inline inet_blackhole_dev_init() to devinet_init().
  net: Rename dev_isalive() to netif_is_alive().
  xfrm: Check netif_is_alive() in xfrm_bundle_create() and
    xfrm_create_dummy_bundle().
  ipv4: Batch rt_flush_dev() in netdev_run_todo().
  ipv6: Batch rt6_uncached_list_flush_dev() in netdev_run_todo().

 drivers/net/loopback.c    |  2 +-
 include/linux/netdevice.h |  6 ++++++
 include/net/ip6_route.h   |  7 +++++++
 include/net/route.h       |  6 ++++++
 net/core/dev.c            |  7 +++++++
 net/core/dev.h            |  6 ------
 net/core/net-sysfs.c      | 16 ++++++++--------
 net/core/netdev_work.c    |  4 ++--
 net/core/rtnetlink.c      |  2 +-
 net/ipv4/devinet.c        | 17 +++++------------
 net/ipv4/route.c          | 11 +++++++++--
 net/ipv6/af_inet6.c       |  2 +-
 net/ipv6/route.c          | 24 ++++++++++++++++--------
 net/xfrm/xfrm_policy.c    |  4 ++--
 14 files changed, 71 insertions(+), 43 deletions(-)

-- 
2.56.0.rc1.315.gc6ed9934b7-goog


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

end of thread, other threads:[~2026-10-06 23:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01 20:47 [PATCH v3 net-next 0/6] ip: Batch flushing uncached routes per batched device unregistration Kuniyuki Iwashima
2026-10-01 20:47 ` [PATCH v3 net-next 1/6] net: Order blackhole_netdev_init(), inet_init(), and inet6_init() Kuniyuki Iwashima
2026-10-05 12:18   ` Fernando Fernandez Mancera
2026-10-01 20:47 ` [PATCH v3 net-next 2/6] ipv4: Inline inet_blackhole_dev_init() to devinet_init() Kuniyuki Iwashima
2026-10-04 23:02   ` netdev-bot+sashiko
2026-10-01 20:47 ` [PATCH v3 net-next 3/6] net: Rename dev_isalive() to netif_is_alive() Kuniyuki Iwashima
2026-10-01 20:47 ` [PATCH v3 net-next 4/6] xfrm: Check netif_is_alive() in xfrm_bundle_create() and xfrm_create_dummy_bundle() Kuniyuki Iwashima
2026-10-01 20:47 ` [PATCH v3 net-next 5/6] ipv4: Batch rt_flush_dev() in netdev_run_todo() Kuniyuki Iwashima
2026-10-04 23:02   ` netdev-bot+sashiko
2026-10-05  0:51     ` Kuniyuki Iwashima
2026-10-01 20:47 ` [PATCH v3 net-next 6/6] ipv6: Batch rt6_uncached_list_flush_dev() " Kuniyuki Iwashima
2026-10-04 23:02   ` netdev-bot+sashiko
2026-10-05  0:49     ` Kuniyuki Iwashima
2026-10-06  8:12 ` [PATCH v3 net-next 0/6] ip: Batch flushing uncached routes per batched device unregistration Ido Schimmel
2026-10-06 17:45   ` Kuniyuki Iwashima
2026-10-06 20:07 ` Chris Arges
2026-10-06 23:10 ` patchwork-bot+netdevbpf

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.