From: Jesse Brandeburg <jesse.brandeburg@linux.dev>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Simon Horman <horms@kernel.org>,
eric.dumazet@gmail.com
Subject: Re: [PATCH v3 net-next 4/5] net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 1)
Date: Tue, 14 Jan 2025 15:05:53 -0800 [thread overview]
Message-ID: <2d92ca69-b187-48aa-9d2c-4eff80efdf32@linux.dev> (raw)
In-Reply-To: <20250114205531.967841-5-edumazet@google.com>
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@google.com
Reviewed-by: Jesse Brandeburg <jbrandeburg@cloudflare.com>
next prev parent reply other threads:[~2025-01-14 23:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d92ca69-b187-48aa-9d2c-4eff80efdf32@linux.dev \
--to=jesse.brandeburg@linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.