mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
rcu: make rcutorture version numbers available through debugfs
It is not possible to accurately correlate rcutorture output with that of debugfs. This patch therefore adds a debugfs file that prints out the rcutorture version number, permitting easy correlation. Signed-off-by: Paul E. McKenney <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
This commit is contained in:
parent
d71df90ead
commit
4a29865689
5 changed files with 85 additions and 4 deletions
|
|
@ -101,6 +101,18 @@ static void invoke_rcu_cpu_kthread(void);
|
|||
|
||||
#define RCU_KTHREAD_PRIO 1 /* RT priority for per-CPU kthreads. */
|
||||
|
||||
/*
|
||||
* Track the rcutorture test sequence number and the update version
|
||||
* number within a given test. The rcutorture_testseq is incremented
|
||||
* on every rcutorture module load and unload, so has an odd value
|
||||
* when a test is running. The rcutorture_vernum is set to zero
|
||||
* when rcutorture starts and is incremented on each rcutorture update.
|
||||
* These variables enable correlating rcutorture output with the
|
||||
* RCU tracing information.
|
||||
*/
|
||||
unsigned long rcutorture_testseq;
|
||||
unsigned long rcutorture_vernum;
|
||||
|
||||
/*
|
||||
* Return true if an RCU grace period is in progress. The ACCESS_ONCE()s
|
||||
* permit this function to be invoked without holding the root rcu_node
|
||||
|
|
@ -192,6 +204,31 @@ void rcu_bh_force_quiescent_state(void)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(rcu_bh_force_quiescent_state);
|
||||
|
||||
/*
|
||||
* Record the number of times rcutorture tests have been initiated and
|
||||
* terminated. This information allows the debugfs tracing stats to be
|
||||
* correlated to the rcutorture messages, even when the rcutorture module
|
||||
* is being repeatedly loaded and unloaded. In other words, we cannot
|
||||
* store this state in rcutorture itself.
|
||||
*/
|
||||
void rcutorture_record_test_transition(void)
|
||||
{
|
||||
rcutorture_testseq++;
|
||||
rcutorture_vernum = 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rcutorture_record_test_transition);
|
||||
|
||||
/*
|
||||
* Record the number of writer passes through the current rcutorture test.
|
||||
* This is also used to correlate debugfs tracing stats with the rcutorture
|
||||
* messages.
|
||||
*/
|
||||
void rcutorture_record_progress(unsigned long vernum)
|
||||
{
|
||||
rcutorture_vernum++;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rcutorture_record_progress);
|
||||
|
||||
/*
|
||||
* Force a quiescent state for RCU-sched.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue