From: Chris Arges <carges@cloudflare.com>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: David Ahern <dsahern@kernel.org>,
Ido Schimmel <idosch@nvidia.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next 0/2] ip: Batch flushing uncached routes per batched device unregistration.
Date: Tue, 29 Sep 2026 21:33:46 -0500 [thread overview]
Message-ID: <arx1CqxoGGRdxv5-@20HS2G4> (raw)
In-Reply-To: <20260929201546.1533268-1-kuniyu@google.com>
On 2026-09-29 20:15:06, Kuniyuki Iwashima wrote:
> Chris J Arges reported high RTNL contention during cleanup_net()
> caused by rt_flush_dev() and rt6_uncached_list_flush_dev() iterating
> over the global per-cpu uncached route lists for every netdev in
> dying netns [0].
>
> This series resolves the issue by batching the uncached route
> cleanup after __rtnl_unlock() in netdev_run_todo().
>
> [0]: https://lore.kernel.org/netdev/20260917-hash-bucket-route-lists-v3-0-30493a37b6eb@cloudflare.com/
>
>
> Changelog:
> v2:
> * Drop ->pre_exit_batch()
> * Do batching after setting NETDEV_UNREGISTERED in netdev_run_todo()
>
> v1: https://lore.kernel.org/netdev/20260927202429.2452589-1-kuniyu@google.com/
>
>
> Kuniyuki Iwashima (2):
> ipv4: Batch rt_flush_dev() in netdev_run_todo().
> ipv6: Batch rt6_uncached_list_flush_dev() in netdev_run_todo().
>
> include/net/ip6_route.h | 7 +++++++
> include/net/route.h | 6 ++++++
> net/core/dev.c | 5 +++++
> net/ipv4/route.c | 11 +++++++++--
> net/ipv6/route.c | 18 ++++++++++++++----
> 5 files changed, 41 insertions(+), 6 deletions(-)
>
> --
> 2.56.0.rc1.315.gc6ed9934b7-goog
>
I was able to test and confirm that this patchset reduces RTNL lock contention
with my test case. Please add:
Tested-by: Chris J Arges <carges@cloudflare.com>
Also for "ipv4: Batch rt_flush_dev() in netdev_run_todo()" please include:
Reported-by: Chris J Arges <carges@cloudflare.com>.
Thanks,
--chris
prev parent reply other threads:[~2026-09-30 2:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 20:15 [PATCH v2 net-next 0/2] ip: Batch flushing uncached routes per batched device unregistration Kuniyuki Iwashima
2026-09-29 20:15 ` [PATCH v2 net-next 1/2] ipv4: Batch rt_flush_dev() in netdev_run_todo() Kuniyuki Iwashima
2026-10-01 2:15 ` netdev-bot+sashiko
2026-10-01 5:27 ` Kuniyuki Iwashima
2026-09-29 20:15 ` [PATCH v2 net-next 2/2] ipv6: Batch rt6_uncached_list_flush_dev() " Kuniyuki Iwashima
2026-10-01 2:15 ` netdev-bot+sashiko
2026-10-01 5:36 ` Kuniyuki Iwashima
2026-09-30 2:33 ` Chris Arges [this message]
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=arx1CqxoGGRdxv5-@20HS2G4 \
--to=carges@cloudflare.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=kuniyu@google.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox