diff options
| author | Eric Dumazet <[email protected]> | 2022-02-19 20:11:55 -0800 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2022-02-22 11:25:40 -0800 |
| commit | ee8f97efa7a59e7f390ed2de627ddd139beb6243 (patch) | |
| tree | a3ef1388f4984ab201c7cd463e7050af6680cf1f /include/linux | |
| parent | d4276e570a0cff6ad28b3b5cb7d3268c846de3a5 (diff) | |
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 <[email protected]>
Acked-by: Paolo Abeni <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions