srcu: Add grace-period number to rcutorture statistics printout
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 19 Jun 2018 15:54:37 +0000 (08:54 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 12 Jul 2018 22:39:25 +0000 (15:39 -0700)
This commit adds the SRCU grace-period number to the rcutorture statistics
printout, which allows it to be compared to the rcutorture "Writer stall
state" message.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/srcutree.c

index e526b56998af48e7617054440a3e9a848f52c8e7..6c9866a854b111b2ee5245ef2b6ca18af994b4c5 100644 (file)
@@ -1268,7 +1268,8 @@ void srcu_torture_stats_print(struct srcu_struct *sp, char *tt, char *tf)
        unsigned long s0 = 0, s1 = 0;
 
        idx = sp->srcu_idx & 0x1;
-       pr_alert("%s%s Tree SRCU per-CPU(idx=%d):", tt, tf, idx);
+       pr_alert("%s%s Tree SRCU g%ld per-CPU(idx=%d):",
+                tt, tf, rcu_seq_current(&sp->srcu_gp_seq), idx);
        for_each_possible_cpu(cpu) {
                unsigned long l0, l1;
                unsigned long u0, u1;