aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-11-21 20:10:16 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-01-10 22:08:02 -0500
commit917963d0b30f9c4153c372c165178501d97b6b55 (patch)
treee7d7d5f6000521527ba8e094eb176ab8936b1e3f /kernel/rcu/tree.c
parentf9103c390257d06c162d9e3c2a90d2bdedadfe17 (diff)
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 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index e26d78712e16..c0faad51ae87 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -315,7 +315,43 @@ static void force_quiescent_state(struct rcu_state *rsp);
315static int rcu_pending(void); 315static int rcu_pending(void);
316 316
317/* 317/*
318 * Return the number of RCU-sched batches processed thus far for debug & stats. 318 * Return the number of RCU batches started thus far for debug & stats.
319 */
320unsigned long rcu_batches_started(void)
321{
322 return rcu_state_p->gpnum;
323}
324EXPORT_SYMBOL_GPL(rcu_batches_started);
325
326/*
327 * Return the number of RCU-sched batches started thus far for debug & stats.
328 */
329unsigned long rcu_batches_started_sched(void)
330{
331 return rcu_sched_state.gpnum;
332}
333EXPORT_SYMBOL_GPL(rcu_batches_started_sched);
334
335/*
336 * Return the number of RCU BH batches started thus far for debug & stats.
337 */
338unsigned long rcu_batches_started_bh(void)
339{
340 return rcu_bh_state.gpnum;
341}
342EXPORT_SYMBOL_GPL(rcu_batches_started_bh);
343
344/*
345 * Return the number of RCU batches completed thus far for debug & stats.
346 */
347unsigned long rcu_batches_completed(void)
348{
349 return rcu_state_p->completed;
350}
351EXPORT_SYMBOL_GPL(rcu_batches_completed);
352
353/*
354 * Return the number of RCU-sched batches completed thus far for debug & stats.
319 */ 355 */
320unsigned long rcu_batches_completed_sched(void) 356unsigned long rcu_batches_completed_sched(void)
321{ 357{
@@ -324,7 +360,7 @@ unsigned long rcu_batches_completed_sched(void)
324EXPORT_SYMBOL_GPL(rcu_batches_completed_sched); 360EXPORT_SYMBOL_GPL(rcu_batches_completed_sched);
325 361
326/* 362/*
327 * Return the number of RCU BH batches processed thus far for debug & stats. 363 * Return the number of RCU BH batches completed thus far for debug & stats.
328 */ 364 */
329unsigned long rcu_batches_completed_bh(void) 365unsigned long rcu_batches_completed_bh(void)
330{ 366{