diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-11-14 19:26:40 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-01-08 17:14:55 -0500 |
commit | 52494535103986dbbf689b44d8c2c7efe2132b16 (patch) | |
tree | 88dd5a9d064608e9711c36f05b3b4aab8e255a4f /include/linux/rcupdate.h | |
parent | dc975e94f322e60fa8fcc44dec1820fde4de174c (diff) |
rcu: Reduce rcutorture tracing
Currently, rcutorture traces every read-side access. This can be
problematic because even a two-minute rcutorture run on a two-CPU system
can generate 28,853,363 reads. Normally, only a failing read is of
interest, so this commit traces adjusts rcutorture's tracing to only
trace failing reads. The resulting event tracing records the time
and the ->completed value captured at the beginning of the RCU read-side
critical section, allowing correlation with other event-tracing messages.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
[ paulmck: Add fix to build problem located by Randy Dunlap based on
diagnosis by Steven Rostedt. ]
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r-- | include/linux/rcupdate.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 275aa3f1062d..7f89cea596e1 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -53,7 +53,10 @@ extern int rcutorture_runnable; /* for sysctl */ | |||
53 | extern void rcutorture_record_test_transition(void); | 53 | extern void rcutorture_record_test_transition(void); |
54 | extern void rcutorture_record_progress(unsigned long vernum); | 54 | extern void rcutorture_record_progress(unsigned long vernum); |
55 | extern void do_trace_rcu_torture_read(char *rcutorturename, | 55 | extern void do_trace_rcu_torture_read(char *rcutorturename, |
56 | struct rcu_head *rhp); | 56 | struct rcu_head *rhp, |
57 | unsigned long secs, | ||
58 | unsigned long c_old, | ||
59 | unsigned long c); | ||
57 | #else | 60 | #else |
58 | static inline void rcutorture_record_test_transition(void) | 61 | static inline void rcutorture_record_test_transition(void) |
59 | { | 62 | { |
@@ -63,9 +66,13 @@ static inline void rcutorture_record_progress(unsigned long vernum) | |||
63 | } | 66 | } |
64 | #ifdef CONFIG_RCU_TRACE | 67 | #ifdef CONFIG_RCU_TRACE |
65 | extern void do_trace_rcu_torture_read(char *rcutorturename, | 68 | extern void do_trace_rcu_torture_read(char *rcutorturename, |
66 | struct rcu_head *rhp); | 69 | struct rcu_head *rhp, |
70 | unsigned long secs, | ||
71 | unsigned long c_old, | ||
72 | unsigned long c); | ||
67 | #else | 73 | #else |
68 | #define do_trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) | 74 | #define do_trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \ |
75 | do { } while (0) | ||
69 | #endif | 76 | #endif |
70 | #endif | 77 | #endif |
71 | 78 | ||