aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index d8917401cbbc..bb84deca3319 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -102,6 +102,18 @@ static void invoke_rcu_cpu_kthread(void);
102#define RCU_KTHREAD_PRIO 1 /* RT priority for per-CPU kthreads. */ 102#define RCU_KTHREAD_PRIO 1 /* RT priority for per-CPU kthreads. */
103 103
104/* 104/*
105 * Track the rcutorture test sequence number and the update version
106 * number within a given test. The rcutorture_testseq is incremented
107 * on every rcutorture module load and unload, so has an odd value
108 * when a test is running. The rcutorture_vernum is set to zero
109 * when rcutorture starts and is incremented on each rcutorture update.
110 * These variables enable correlating rcutorture output with the
111 * RCU tracing information.
112 */
113unsigned long rcutorture_testseq;
114unsigned long rcutorture_vernum;
115
116/*
105 * Return true if an RCU grace period is in progress. The ACCESS_ONCE()s 117 * Return true if an RCU grace period is in progress. The ACCESS_ONCE()s
106 * permit this function to be invoked without holding the root rcu_node 118 * permit this function to be invoked without holding the root rcu_node
107 * structure's ->lock, but of course results can be subject to change. 119 * structure's ->lock, but of course results can be subject to change.
@@ -193,6 +205,31 @@ void rcu_bh_force_quiescent_state(void)
193EXPORT_SYMBOL_GPL(rcu_bh_force_quiescent_state); 205EXPORT_SYMBOL_GPL(rcu_bh_force_quiescent_state);
194 206
195/* 207/*
208 * Record the number of times rcutorture tests have been initiated and
209 * terminated. This information allows the debugfs tracing stats to be
210 * correlated to the rcutorture messages, even when the rcutorture module
211 * is being repeatedly loaded and unloaded. In other words, we cannot
212 * store this state in rcutorture itself.
213 */
214void rcutorture_record_test_transition(void)
215{
216 rcutorture_testseq++;
217 rcutorture_vernum = 0;
218}
219EXPORT_SYMBOL_GPL(rcutorture_record_test_transition);
220
221/*
222 * Record the number of writer passes through the current rcutorture test.
223 * This is also used to correlate debugfs tracing stats with the rcutorture
224 * messages.
225 */
226void rcutorture_record_progress(unsigned long vernum)
227{
228 rcutorture_vernum++;
229}
230EXPORT_SYMBOL_GPL(rcutorture_record_progress);
231
232/*
196 * Force a quiescent state for RCU-sched. 233 * Force a quiescent state for RCU-sched.
197 */ 234 */
198void rcu_sched_force_quiescent_state(void) 235void rcu_sched_force_quiescent_state(void)