summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-11-21 17:10:16 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-01-10 19:08:02 -0800
commit917963d0b30f9c4153c372c165178501d97b6b55 (patch)
treee7d7d5f6000521527ba8e094eb176ab8936b1e3f /include/linux
parentf9103c390257d06c162d9e3c2a90d2bdedadfe17 (diff)
downloadlinux-917963d0b30f9c4153c372c165178501d97b6b55.tar.gz
linux-917963d0b30f9c4153c372c165178501d97b6b55.tar.bz2
linux-917963d0b30f9c4153c372c165178501d97b6b55.zip
rcutorture: Check from beginning to end of grace period
Currently, rcutorture's Reader Batch checks measure from the end of the previous grace period to the end of the current one. This commit tightens up these checks by measuring from the start and end of the same grace period. This involves adding rcu_batches_started() and friends corresponding to the existing rcu_batches_completed() and friends. We leave SRCU alone for the moment, as it does not yet have a way of tracking both ends of its grace periods. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rcutiny.h30
-rw-r--r--include/linux/rcutree.h3
2 files changed, 30 insertions, 3 deletions
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 1ce2d6b8f0c3..984192160e9b 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -92,7 +92,31 @@ static inline void rcu_virt_note_context_switch(int cpu)
}
/*
- * Return the number of grace periods.
+ * Return the number of grace periods started.
+ */
+static inline unsigned long rcu_batches_started(void)
+{
+ return 0;
+}
+
+/*
+ * Return the number of bottom-half grace periods started.
+ */
+static inline unsigned long rcu_batches_started_bh(void)
+{
+ return 0;
+}
+
+/*
+ * Return the number of sched grace periods started.
+ */
+static inline unsigned long rcu_batches_started_sched(void)
+{
+ return 0;
+}
+
+/*
+ * Return the number of grace periods completed.
*/
static inline unsigned long rcu_batches_completed(void)
{
@@ -100,7 +124,7 @@ static inline unsigned long rcu_batches_completed(void)
}
/*
- * Return the number of bottom-half grace periods.
+ * Return the number of bottom-half grace periods completed.
*/
static inline unsigned long rcu_batches_completed_bh(void)
{
@@ -108,7 +132,7 @@ static inline unsigned long rcu_batches_completed_bh(void)
}
/*
- * Return the number of sched grace periods.
+ * Return the number of sched grace periods completed.
*/
static inline unsigned long rcu_batches_completed_sched(void)
{
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 9885bfb6b123..c0dd124e69ec 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -81,6 +81,9 @@ void cond_synchronize_rcu(unsigned long oldstate);
extern unsigned long rcutorture_testseq;
extern unsigned long rcutorture_vernum;
+unsigned long rcu_batches_started(void);
+unsigned long rcu_batches_started_bh(void);
+unsigned long rcu_batches_started_sched(void);
unsigned long rcu_batches_completed(void);
unsigned long rcu_batches_completed_bh(void);
unsigned long rcu_batches_completed_sched(void);