From c6f4e552e1eae4a5726230254108213b085e1ae3 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sat, 15 Nov 2025 19:07:41 -0800 Subject: rcutorture: Add a textbook-style trivial preemptible RCU This commit adds a trivial textbook implementation of preemptible RCU to rcutorture ("torture_type=trivial-preempt"), similar in spirit to the existing "torture_type=trivial" textbook implementation of non-preemptible RCU. Neither trivial RCU implementation has any value for production use, and are intended only to keep Paul honest in his introductory writings and presentations. [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Joel Fernandes --- .../testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT | 12 ++++++++++++ .../selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot (limited to 'tools/testing') diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT b/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT new file mode 100644 index 000000000000..8230b14bfe68 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT @@ -0,0 +1,12 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_RCU_EXPERT=y +CONFIG_TRIVIAL_PREEMPT_RCU=y diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot b/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot new file mode 100644 index 000000000000..299cd3a12df6 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot @@ -0,0 +1,3 @@ +rcutorture.torture_type=trivial-preempt +rcutorture.onoff_interval=0 +rcutorture.shuffle_interval=0 -- cgit v1.2.3