summaryrefslogtreecommitdiff
path: root/net/iucv/iucv.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-02-20 07:11:55 +0300
committerJakub Kicinski <kuba@kernel.org>2022-02-22 22:25:40 +0300
commitee8f97efa7a59e7f390ed2de627ddd139beb6243 (patch)
treea3ef1388f4984ab201c7cd463e7050af6680cf1f /net/iucv/iucv.c
parentd4276e570a0cff6ad28b3b5cb7d3268c846de3a5 (diff)
downloadlinux-ee8f97efa7a59e7f390ed2de627ddd139beb6243.tar.xz
gro_cells: avoid using synchronize_rcu() in gro_cells_destroy()
Another thing making netns dismantles potentially very slow is located in gro_cells_destroy(), whenever cleanup_net() has to remove a device using gro_cells framework. RTNL is not held at this stage, so synchronize_net() is calling synchronize_rcu(): netdev_run_todo() ip_tunnel_dev_free() gro_cells_destroy() synchronize_net() synchronize_rcu() // Ouch. This patch uses call_rcu(), and gave me a 25x performance improvement in my tests. cleanup_net() is no longer blocked ~10 ms per synchronize_rcu() call. In the case we could not allocate the memory needed to queue the deferred free, use synchronize_rcu_expedited() v2: made percpu_free_defer_callback() static Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Link: https://lore.kernel.org/r/20220220041155.607637-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/iucv/iucv.c')
0 files changed, 0 insertions, 0 deletions