|
|
Log in / Subscribe / Register

Concurrency Testing

From:  Kumar Kartikeya Dwivedi <memxor-AT-gmail.com>
To:  bpf-AT-vger.kernel.org
Subject:  [RFC PATCH bpf-next v1 0/6] Concurrency Testing
Date:  Wed, 11 Feb 2026 10:12:40 -0800
Message-ID:  <20260211181248.3040142-1-memxor@gmail.com>
Cc:  Alexei Starovoitov <ast-AT-kernel.org>, Andrii Nakryiko <andrii-AT-kernel.org>, Daniel Borkmann <daniel-AT-iogearbox.net>, Martin KaFai Lau <martin.lau-AT-kernel.org>, Eduard Zingerman <eddyz87-AT-gmail.com>, Mykyta Yatsenko <yatsenko-AT-meta.com>, kkd-AT-meta.com, kernel-team-AT-meta.com
Archive-link:  Article

This set introduces basic tooling to generate more exhaustive test cases
for task<->NMI reentrancy and parallel invocation of various operations
associated with rqspinlock, timer, wq, and task_work. For now, the
approach is simple: test cases are generated up to a maximum specified
level of parallelism for the operations to be invoked vertically against
each other (on the same CPU, in different contexts), and horizontally
(in parallel). To cut down test time, similar cases are pruned out after
generation (e.g. start vs cancel and cancel vs start in parallel on two
CPUs are similar, thus only one combination should be tested).

More details are in the commit log.

Kumar Kartikeya Dwivedi (6):
  bpf: Support repeat, duration fields for syscall prog runs
  bpf: Allow timing functions in lock critical sections
  bpf: Enable rqspinlock in tracing progs
  selftests/bpf: Introduce concurrency testing tool
  selftests/bpf: Generate various conctest permutations
  selftests/bpf: Extend conctest to wq and task_work

 kernel/bpf/verifier.c                        |    9 +-
 net/bpf/test_run.c                           |   92 +-
 tools/testing/selftests/bpf/Makefile         |    6 +
 tools/testing/selftests/bpf/conctest.c       | 1110 ++++++++++++++++++
 tools/testing/selftests/bpf/progs/conctest.c |  758 ++++++++++++
 5 files changed, 1955 insertions(+), 20 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/conctest.c
 create mode 100644 tools/testing/selftests/bpf/progs/conctest.c


base-commit: dc855b77719fe452d670cae2cf64da1eb51f16cc
-- 
2.47.3




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds