Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1376976
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH tip/core/rcu 03/24] rcutorture: Expedited-GP batch progress access to torturing |
| Date | 2016-04-12 18:00 +0200 |
| Message-ID | <rn8To-1ma-21@gated-at.bofh.it> (permalink) |
| References | <rn8JH-1i4-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This commit provides rcu_exp_batches_completed() and
rcu_exp_batches_completed_sched() functions to allow torture-test modules
to check how many expedited grace period batches have completed.
These are analogous to the existing rcu_batches_completed(),
rcu_batches_completed_bh(), and rcu_batches_completed_sched() functions.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcutiny.h | 16 ++++++++++++++++
include/linux/rcutree.h | 2 ++
kernel/rcu/tree.c | 22 ++++++++++++++++++++++
3 files changed, 40 insertions(+)
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 64809aea661c..93aea75029fb 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -149,6 +149,22 @@ static inline unsigned long rcu_batches_completed_sched(void)
return 0;
}
+/*
+ * Return the number of expedited grace periods completed.
+ */
+static inline unsigned long rcu_exp_batches_completed(void)
+{
+ return 0;
+}
+
+/*
+ * Return the number of expedited sched grace periods completed.
+ */
+static inline unsigned long rcu_exp_batches_completed_sched(void)
+{
+ return 0;
+}
+
static inline void rcu_force_quiescent_state(void)
{
}
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index ad1eda9fa4da..5043cb823fb2 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -87,6 +87,8 @@ 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);
+unsigned long rcu_exp_batches_completed(void);
+unsigned long rcu_exp_batches_completed_sched(void);
void show_rcu_gp_kthreads(void);
void rcu_force_quiescent_state(void);
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 531a328076bd..88df64087dfe 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -460,6 +460,28 @@ unsigned long rcu_batches_completed_bh(void)
EXPORT_SYMBOL_GPL(rcu_batches_completed_bh);
/*
+ * Return the number of RCU expedited batches completed thus far for
+ * debug & stats. Odd numbers mean that a batch is in progress, even
+ * numbers mean idle. The value returned will thus be roughly double
+ * the cumulative batches since boot.
+ */
+unsigned long rcu_exp_batches_completed(void)
+{
+ return rcu_state_p->expedited_sequence;
+}
+EXPORT_SYMBOL_GPL(rcu_exp_batches_completed);
+
+/*
+ * Return the number of RCU-sched expedited batches completed thus far
+ * for debug & stats. Similar to rcu_exp_batches_completed().
+ */
+unsigned long rcu_exp_batches_completed_sched(void)
+{
+ return rcu_sched_state.expedited_sequence;
+}
+EXPORT_SYMBOL_GPL(rcu_exp_batches_completed_sched);
+
+/*
* Force a quiescent state.
*/
void rcu_force_quiescent_state(void)
--
2.5.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH tip/core/rcu 0/24] Torture-test changes for 4.7 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:50 +0200 [PATCH tip/core/rcu 11/24] rcutorture: Add rcuperf holdoff boot parameter to reduce interference "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:50 +0200 [PATCH tip/core/rcu 17/24] torture: Clarify refusal to run more than one torture test "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:50 +0200 [PATCH tip/core/rcu 01/24] rcutorture: Update scripting to accommodate rcuperf "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 18:00 +0200 [PATCH tip/core/rcu 03/24] rcutorture: Expedited-GP batch progress access to torturing "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 18:00 +0200 [PATCH tip/core/rcu 04/24] rcutorture: Add RCU grace-period performance tests "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 18:00 +0200 [PATCH tip/core/rcu 05/24] rcutorture: Documentation for rcuperf kernel parameters "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 18:00 +0200
csiph-web