Skip to content

Commit d66e4cf

Browse files
committed
srcu: Add GP and maximum requested GP to Tiny SRCU rcutorture output
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 <[email protected]>
1 parent 599d97e commit d66e4cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/linux/srcutiny.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ static inline void srcu_torture_stats_print(struct srcu_struct *ssp,
8282
int idx;
8383

8484
idx = ((data_race(READ_ONCE(ssp->srcu_idx)) + 1) & 0x2) >> 1;
85-
pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%hd,%hd)\n",
85+
pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%hd,%hd) gp: %hu->%hu\n",
8686
tt, tf, idx,
8787
data_race(READ_ONCE(ssp->srcu_lock_nesting[!idx])),
88-
data_race(READ_ONCE(ssp->srcu_lock_nesting[idx])));
88+
data_race(READ_ONCE(ssp->srcu_lock_nesting[idx])),
89+
data_race(READ_ONCE(ssp->srcu_idx)),
90+
data_race(READ_ONCE(ssp->srcu_idx_max)));
8991
}
9092

9193
#endif

0 commit comments

Comments
 (0)