rcutorture: Add tests for SRCU up/down reader primitives
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 7 Feb 2025 19:37:55 +0000 (11:37 -0800)
committerNeeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
Wed, 25 Jun 2025 03:09:01 +0000 (08:39 +0530)
commit1b67e031d478bf386282c7c5ff3f19cd9c1e5a39
tree52e525574eb86a0fe98e8ca358e2b7de63e10615
parenteec1f94cf77f8a7f7078365f5029a56b0ce16580
rcutorture: Add tests for SRCU up/down reader primitives

This commit adds a new rcutorture.n_up_down kernel boot parameter
that specifies the number of outstanding SRCU up/down readers, which
begin in kthread context and end in an hrtimer handler.  There is a new
kthread ("rcu_torture_updown") that scans an per-reader array looking
for elements whose readers have ended.  This kthread sleeps between one
and two milliseconds between consecutive scans.

[ paulmck: Apply kernel test robot feedback. ]
[ paulmck: Apply Z qiang feedback. ]
[ joel: Fix build error: hrtimer_init is replaced by  hrtimer_setup. ]
[ joel: Apply Boqun bug fix to drop extra up_read() call in
        rcu_torture_updown()].

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Tested-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
kernel/rcu/rcutorture.c