aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/srcutiny.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-04-18 17:17:35 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-04-26 11:23:28 -0700
commit7f6733c3c648ddd6cf459c1b80ad388a95452955 (patch)
tree2d463d3a2c5b47f3bfb7098e1000ad043ed0842f /include/linux/srcutiny.h
parentsrcu: Exact tracking of srcu_data structures containing callbacks (diff)
downloadlinux-dev-7f6733c3c648ddd6cf459c1b80ad388a95452955.tar.xz
linux-dev-7f6733c3c648ddd6cf459c1b80ad388a95452955.zip
srcu: Make rcutorture writer stalls print SRCU GP state
In the past, SRCU was simple enough that there was little point in making the rcutorture writer stall messages print the SRCU grace-period number state. With the advent of Tree SRCU, this has changed. This commit therefore makes Classic, Tiny, and Tree SRCU report this state to rcutorture as needed. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested-by: Mike Galbraith <efault@gmx.de>
Diffstat (limited to 'include/linux/srcutiny.h')
-rw-r--r--include/linux/srcutiny.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
index 4f284e4f4d8c..42311ee0334f 100644
--- a/include/linux/srcutiny.h
+++ b/include/linux/srcutiny.h
@@ -78,4 +78,16 @@ static inline unsigned long srcu_batches_completed(struct srcu_struct *sp)
return 0;
}
+static inline void srcutorture_get_gp_data(enum rcutorture_type test_type,
+ struct srcu_struct *sp, int *flags,
+ unsigned long *gpnum,
+ unsigned long *completed)
+{
+ if (test_type != SRCU_FLAVOR)
+ return;
+ *flags = 0;
+ *completed = sp->srcu_gp_seq;
+ *gpnum = *completed;
+}
+
#endif