selftests/bpf: add bpf task work stress tests
authorMykyta Yatsenko <yatsenko@meta.com>
Tue, 23 Sep 2025 11:24:04 +0000 (12:24 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Sep 2025 14:34:39 +0000 (07:34 -0700)
commitc6ae18e0af5e7c809ac26350043924e062dbb76f
tree5711595f7d17ddd335f8f186720480a878b37870
parent39fd74dfd5d2ea9d1e94b2e03076284616798551
selftests/bpf: add bpf task work stress tests

Add stress tests for BPF task-work scheduling kfuncs. The tests spawn
multiple threads that concurrently schedule task_work callbacks against
the same and different map values to exercise the kfuncs under high
contention.
Verify callbacks are reliably enqueued and executed with no drops.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Link: https://lore.kernel.org/r/20250923112404.668720-10-mykyta.yatsenko5@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/task_work_stress.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/task_work_stress.c [new file with mode: 0644]