netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/5] net: reduce RTNL pressure in unregister_netdevice()
@ 2025-01-14 20:55 Eric Dumazet
  2025-01-14 20:55 ` [PATCH v3 net-next 1/5] net: expedite synchronize_net() for cleanup_net() Eric Dumazet
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Eric Dumazet @ 2025-01-14 20:55 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, Simon Horman, eric.dumazet, Eric Dumazet

One major source of RTNL contention resides in unregister_netdevice()

Due to RCU protection of various network structures, and
unregister_netdevice() being a synchronous function,
it is calling potentially slow functions while holding RTNL.

I think we can release RTNL in two points, so that three
slow functions are called while RTNL can be used
by other threads.

v3: Deal with CONFIG_NET_NS=n
    Use net_todo_list_for_cleanup_net in third patch.
    Split the last patch in two parts for future bisections.

v2: Only temporarily release RTNL from cleanup_net()

v1: https://lore.kernel.org/netdev/20250107130906.098fc8d6@kernel.org/T/#m398c95f5778e1ff70938e079d3c4c43c050ad2a6



Eric Dumazet (5):
  net: expedite synchronize_net() for cleanup_net()
  net: no longer assume RTNL is held in flush_all_backlogs()
  net: no longer hold RTNL while calling flush_all_backlogs()
  net: reduce RTNL hold duration in unregister_netdevice_many_notify()
    (part 1)
  net: reduce RTNL hold duration in unregister_netdevice_many_notify()
    (part 2)

 include/net/net_namespace.h |  2 +
 net/core/dev.c              | 97 ++++++++++++++++++++++++++++---------
 net/core/net_namespace.c    |  5 ++
 3 files changed, 82 insertions(+), 22 deletions(-)

-- 
2.48.0.rc2.279.g1de40edade-goog


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

end of thread, other threads:[~2025-02-10  4:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-14 20:55 [PATCH v3 net-next 0/5] net: reduce RTNL pressure in unregister_netdevice() Eric Dumazet
2025-01-14 20:55 ` [PATCH v3 net-next 1/5] net: expedite synchronize_net() for cleanup_net() Eric Dumazet
2025-01-14 22:57   ` Jesse Brandeburg
2025-01-14 20:55 ` [PATCH v3 net-next 2/5] net: no longer assume RTNL is held in flush_all_backlogs() Eric Dumazet
2025-01-14 23:01   ` Jesse Brandeburg
2025-01-14 20:55 ` [PATCH v3 net-next 3/5] net: no longer hold RTNL while calling flush_all_backlogs() Eric Dumazet
2025-01-14 23:04   ` Jesse Brandeburg
2025-02-10  4:13   ` Kuniyuki Iwashima
2025-01-14 20:55 ` [PATCH v3 net-next 4/5] net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 1) Eric Dumazet
2025-01-14 23:05   ` Jesse Brandeburg
2025-01-14 20:55 ` [PATCH v3 net-next 5/5] net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 2) Eric Dumazet
2025-01-14 23:09   ` Jesse Brandeburg
2025-01-16  3:30 ` [PATCH v3 net-next 0/5] net: reduce RTNL pressure in unregister_netdevice() patchwork-bot+netdevbpf

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).