Eric Dumazet 2836615aa2 netns: add schedule point in ops_exit_list()
When under stress, cleanup_net() can have to dismantle
netns in big numbers. ops_exit_list() currently calls
many helpers [1] that have no schedule point, and we can
end up with soft lockups, particularly on hosts
with many cpus.

Even for moderate amount of netns processed by cleanup_net()
this patch avoids latency spikes.

[1] Some of these helpers like fib_sync_up() and fib_sync_down_dev()
are very slow because net/ipv4/fib_semantics.c uses host-wide hash tables,
and ifindex is used as the only input of two hash functions.
    ifindexes tend to be the same for all netns (lo.ifindex==1 per instance)
    This will be fixed in a separate patch.

Fixes: 72ad937abd0a ("net: Add support for batching network namespace cleanups")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-18 13:40:58 +00:00
..
2021-11-04 21:04:25 +09:00
2021-10-24 13:59:45 +01:00
2021-11-23 20:16:22 -08:00
2022-01-06 11:59:10 +00:00
2022-01-06 12:33:35 +00:00
2021-05-26 07:03:39 +02:00
2022-01-11 20:26:36 -08:00
2021-11-27 10:33:55 -08:00
2021-12-21 07:41:52 -08:00
2021-06-03 15:13:56 -07:00
2021-07-29 15:06:49 +01:00