[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d92ca69-b187-48aa-9d2c-4eff80efdf32@linux.dev>
Date: Tue, 14 Jan 2025 15:05:53 -0800
From: Jesse Brandeburg <jesse.brandeburg@...ux.dev>
To: Eric Dumazet <edumazet@...gle.com>, "David S . Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, Simon Horman <horms@...nel.org>,
eric.dumazet@...il.com
Subject: Re: [PATCH v3 net-next 4/5] net: reduce RTNL hold duration in
unregister_netdevice_many_notify() (part 1)
On 1/14/25 12:55 PM, Eric Dumazet wrote:
> Two synchronize_net() calls are currently done while holding RTNL.
>
> This is source of RTNL contention in workloads adding and deleting
> many network namespaces per second, because synchronize_rcu()
> and synchronize_rcu_expedited() can use 60+ ms in some cases.
>
> For cleanup_net() use, temporarily release RTNL
> while calling the last synchronize_net().
>
> This should be safe, because devices are no longer visible
> to other threads at this point.
>
> In any case, the new netdev_lock() / netdev_unlock()
> infrastructure that we are adding should allow
> to fix potential issues, with a combination
> of a per-device mutex and dev->reg_state awareness.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com
Reviewed-by: Jesse Brandeburg <jbrandeburg@...udflare.com>
Powered by blists - more mailing lists