neighbour: Don't let neigh_forced_gc() disable preemption for long
authorJudy Hsiao <judyhsiao@chromium.org>
Wed, 6 Dec 2023 03:38:33 +0000 (03:38 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:51:43 +0000 (11:51 +0100)
commitcdd8512a5574dba9ca5e84480a1b6f67c0214e80
treee193c71e458fb0c0b01b08a581ffd38f6060cd08
parentff89e507b231a3afbddc2972a850947b73247a3b
neighbour: Don't let neigh_forced_gc() disable preemption for long

[ Upstream commit e5dc5afff62f3e97e86c3643ec9fcad23de4f2d3 ]

We are seeing cases where neigh_cleanup_and_release() is called by
neigh_forced_gc() many times in a row with preemption turned off.
When running on a low powered CPU at a low CPU frequency, this has
been measured to keep preemption off for ~10 ms. That's not great on a
system with HZ=1000 which expects tasks to be able to schedule in
with ~1ms latency.

Suggested-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/neighbour.c