|
|
Log in / Subscribe / Register

net: reduce RTNL pressure in unregister_netdevice()

From:  Eric Dumazet <edumazet-AT-google.com>
To:  "David S . Miller" <davem-AT-davemloft.net>, Jakub Kicinski <kuba-AT-kernel.org>, Paolo Abeni <pabeni-AT-redhat.com>
Subject:  [PATCH net-next 0/4] net: reduce RTNL pressure in unregister_netdevice()
Date:  Tue, 07 Jan 2025 17:38:34 +0000
Message-ID:  <20250107173838.1130187-1-edumazet@google.com>
Cc:  netdev-AT-vger.kernel.org, Simon Horman <horms-AT-kernel.org>, eric.dumazet-AT-gmail.com, Eric Dumazet <edumazet-AT-google.com>
Archive-link:  Article

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.

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

 include/net/net_namespace.h |  2 ++
 net/core/dev.c              | 61 +++++++++++++++++++++++++------------
 net/core/net_namespace.c    |  5 +++
 3 files changed, 48 insertions(+), 20 deletions(-)

-- 
2.47.1.613.gc27f4b7a9f-goog




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds