]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpf: report RCU QS in cpumap kthread
authorYan Zhai <yan@cloudflare.com>
Tue, 19 Mar 2024 20:44:40 +0000 (13:44 -0700)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:20:12 +0000 (18:20 -0400)
commit5fcee137dbd948db3c843ae79d6885702c68e1a1
treece37a933a8e6ce0af7efdd8873a0bc489750858f
parente92971a7ed42a36e03ddec6cd602a5c25e2f4bc5
bpf: report RCU QS in cpumap kthread

[ Upstream commit 00bf63122459e87193ee7f1bc6161c83a525569f ]

When there are heavy load, cpumap kernel threads can be busy polling
packets from redirect queues and block out RCU tasks from reaching
quiescent states. It is insufficient to just call cond_resched() in such
context. Periodically raise a consolidated RCU QS before cond_resched
fixes the problem.

Fixes: 6710e1126934 ("bpf: introduce new bpf cpu map type BPF_MAP_TYPE_CPUMAP")
Reviewed-by: Jesper Dangaard Brouer <hawk@kernel.org>
Signed-off-by: Yan Zhai <yan@cloudflare.com>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Link: https://lore.kernel.org/r/c17b9f1517e19d813da3ede5ed33ee18496bb5d8.1710877680.git.yan@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/bpf/cpumap.c