Re: [PATCH v3 net-next 0/6] ip: Batch flushing uncached routes per batched device unregistration.
flat view
From: Kuniyuki Iwashima <kuniyu@google.com>
Date: 2026-10-06 17:45:42
On Tue, Oct 6, 2026 at 1:12 AM Ido Schimmel [off-list ref] wrote:
On Thu, Oct 01, 2026 at 08:47:12PM +0000, Kuniyuki Iwashima wrote:quoted
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/ (local) Changelog: v3: * Add patch 1 ~ 4Reviewed-by: Ido Schimmel <idosch@nvidia.com> For next time: The cover letter should explain how the patches fit together. Otherwise it's up to the reviewer to figure it out.
Sorry, I should have added it.
The dependency between patches 1 and 6 is not immediately clear. My understanding:
Yes, correct. Thanks !
Patch 1 is needed so that the IPv6 uncached lists are initialized before they can be traversed for devices that are unregistered due to failed initialization. Patch 2 is a cleanup that is made possible by patch 1. Patches 3-4 are preparations for patches 5-6 that are going to walk the uncached lists once per batch of unregistered devices. If a dst entry that points to an unregistered device is put on the list after the walk, nothing will clean it up after patches 5-6. Patches 5-6 avoid walking the uncached lists for every device being unregistered. Instead, walk the lists after one or more devices were unregistered and delete from the lists entries that point to such devices.