Files
kernel_xiaomi_raphael/include/net
Eric Dumazet 2ee1663e55 net/dst: use a smaller percpu_counter batch for dst entries accounting
commit cf86a086a18095e33e0637cb78cda1fcf5280852 upstream.

percpu_counter_add() uses a default batch size which is quite big
on platforms with 256 cpus. (2*256 -> 512)

This means dst_entries_get_fast() can be off by +/- 2*(nr_cpus^2)
(131072 on servers with 256 cpus)

Reduce the batch size to something more reasonable, and
add logic to ip6_dst_gc() to call dst_entries_get_slow()
before calling the _very_ expensive fib6_run_gc() function.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Suraj Jitindar Singh <surajjs@amazon.com>
Cc: <stable@vger.kernel.org> # 4.19.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9635bd0a5296e2e725c6b33e530d0ef582e2f64e)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-01-18 11:27:47 +00:00
..
2021-06-10 12:43:51 +02:00
2019-03-23 14:35:16 +01:00
2022-01-05 12:33:49 +01:00
2019-11-10 11:25:37 +01:00
2021-08-04 12:22:17 +02:00
2018-05-16 10:10:23 +02:00