srcu: Add GP and maximum requested GP to Tiny SRCU rcutorture output
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 2 Aug 2022 17:18:23 +0000 (10:18 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 31 Aug 2022 12:10:15 +0000 (05:10 -0700)
This commit adds the ->srcu_idx and ->srcu_max_idx fields to the Tiny
SRCU rcutorture output for additional diagnostics.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/srcutiny.h

index 6cfaa0a9a9b961f467524de59edbf8aedb73f50d..4fcec6f5af908764f3073006e394ba8a76f7009b 100644 (file)
@@ -82,10 +82,12 @@ static inline void srcu_torture_stats_print(struct srcu_struct *ssp,
        int idx;
 
        idx = ((data_race(READ_ONCE(ssp->srcu_idx)) + 1) & 0x2) >> 1;
-       pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%hd,%hd)\n",
+       pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%hd,%hd) gp: %hu->%hu\n",
                 tt, tf, idx,
                 data_race(READ_ONCE(ssp->srcu_lock_nesting[!idx])),
-                data_race(READ_ONCE(ssp->srcu_lock_nesting[idx])));
+                data_race(READ_ONCE(ssp->srcu_lock_nesting[idx])),
+                data_race(READ_ONCE(ssp->srcu_idx)),
+                data_race(READ_ONCE(ssp->srcu_idx_max)));
 }
 
 #endif