]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Add ABBCCA case for rqspinlock stress test
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Wed, 29 Oct 2025 18:18:28 +0000 (18:18 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 30 Oct 2025 01:17:56 +0000 (18:17 -0700)
commita8a0abf097541aa98132565b9f2a5c6c7c307b55
treefd4637e496ffddd9ebe4665a570a1fd117f51923
parent7bd6e5ce5be666fb3fb873bf20f77e62555b7835
selftests/bpf: Add ABBCCA case for rqspinlock stress test

Introduce a new mode for the rqspinlock stress test that exercises a
deadlock that won't be detected by the AA and ABBA checks, such that we
always reliably trigger the timeout fallback. We need 4 CPUs for this
particular case, as CPU 0 is untouched, and three participant CPUs for
triggering the ABBCCA case.

Refactor the lock acquisition paths in the module to better reflect the
three modes and choose the right lock depending on the context.

Also drop ABBA case from running by default as part of test progs, since
the stress test can consume a significant amount of time.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Reviewed-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20251029181828.231529-3-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/res_spin_lock.c
tools/testing/selftests/bpf/test_kmods/bpf_test_rqspinlock.c