Skip to content

net: reduce RTNL pressure in unregister_netdevice()

Eric Dumazet netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 6 repliesApplied 5/5
  2. v24 patches 1 replySuperseded
  3. v14 patches 4 repliesSuperseded

Patches in v3 All 5 applied

#Subject and filesSizeRepliesApplied
1/5net: expedite synchronize_net() for cleanup_net()include/net/net_namespace.h net/core/dev.c net/core/net_namespace.c+17 -11 replyApplied
2/5net: no longer assume RTNL is held in flush_all_backlogs()net/core/dev.c+35 -181 replyApplied
3/5net: no longer hold RTNL while calling flush_all_backlogs()net/core/dev.c+28 -32 repliesApplied
4/5net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 1)net/core/dev.c+3 -01 replyApplied
5/5net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 2)net/core/dev.c+1 -21 replyApplied

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchJesse Brandeburg
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 net-next 0/5] net: reduce RTNL pressure in unregister_netdevice()

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/[email protected]/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(-)
Signature · 1 line
2.48.0.rc2.279.g1de40edade-goog