[PATCH 17/17] rcutorture: Document directed SRCU NMI tests
From: Kunwu Chan
Date: Tue Dec 01 2026 - 11:23:08 EST
Describe the idle and loaded workloads and reader-flavor matrix.
Explain how to read ver and wgps in a burst. Note that irqsave
readers require task context and are not exercised from NMI.
Signed-off-by: Kunwu Chan <kunwu.chan@xxxxxxxxx>
---
Documentation/RCU/torture.rst | 49 +++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/Documentation/RCU/torture.rst b/Documentation/RCU/torture.rst
index d6fcc900ccab..791774698440 100644
--- a/Documentation/RCU/torture.rst
+++ b/Documentation/RCU/torture.rst
@@ -349,6 +349,55 @@ console log for close-call analysis.
Observe fastpath hits separately. To check autonomous callback
progress, observe completion before the cleanup barrier.
+For a synchronous expedited update, ``rcutorture.gp_exp_burst=N`` is
+the per-iteration limit of waits when the writer selects the
+synchronous expedited operation. ``ver`` counts completed update
+iterations and ``wgps`` counts completed synchronous waits. Choose a
+statistics interval that accommodates stutter and slow readers.
+
+An idle-biased NMI reader run can add the following boot arguments to the
+ordinary expedited example::
+
+ rcutorture.gp_exp_burst=64 rcutorture.nreaders=0
+ rcutorture.nfakewriters=0 rcutorture.n_up_down=0
+ rcutorture.read_exit_burst=0 rcutorture.fwd_progress=0
+ rcutorture.irqreader=0 rcutorture.stutter=0 rcutorture.n_barrier_cbs=0
+
+Keep a loaded run with task readers and callbacks enabled. Test reader
+flavors separately. The atomic cases exercise a separate updater.
+
+.. list-table:: Directed SRCU NMI coverage
+ :header-rows: 1
+
+ * - Case
+ - Configuration and workload
+ - NMI checker mode
+ * - Ordinary expedited
+ - Flavor 0x2; SMALL and BIG; NEED_SRCU_NMI_SAFE disabled and enabled
+ - both
+ * - FAST fallback
+ - Flavor 0x4; PROVE_RCU disabled; synchronous expedited updates
+ - both
+ * - FAST_UPDOWN fallback
+ - Flavor 0x8; PROVE_RCU disabled; NMI readers unsupported
+ - calls
+ * - Atomic regression
+ - Flavor 0x10; atomic_irqsave=0 and 1; both counter implementations
+ - readers
+ * - Tiny atomic regression
+ - SRCU-T; flavor 0x10; atomic_irqsave=1; PREEMPTION enabled
+ - readers
+
+Keep task readers enabled to exercise the irqsave variant. NMI
+readers always use the plain atomic API. A ``readers`` PASS with
+no task readers validates only the NMI atomic reader, not the
+irqsave variant.
+
+On x86, toggle ``CONFIG_FORCE_NEED_SRCU_NMI_SAFE`` to exercise
+``this_cpu_inc()`` and atomic increments. Verify ``CONFIG_NEED_SRCU_NMI_SAFE``
+in the built configuration. FAST readers have a different ordering
+contract and fall back to the worker.
+
For the PMU-off control, rerun kvm.sh with ``-cpu host,pmu=off`` and a
fresh ``--datestamp``. If torture reports SUCCESS, expect a zero-count
summary and SKIP from the coverage checker.
--
2.43.0