diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-19 13:51:42 -0500 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-05-13 14:18:18 -0400 |
| commit | ad0dc7f94dbf417b1c7d42e1f0b250f045b27f8f (patch) | |
| tree | 7ab989cc1da5014778a7bd24ec94184104e5b517 /include/linux | |
| parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
rcutorture: Add forward-progress checking for writer
The rcutorture output currently does not distinguish between stalls in
the RCU implementation and stalls in the rcu_torture_writer() kthreads.
This commit therefore adds some diagnostics to help distinguish between
these two conditions, at least for the non-SRCU implementations. (SRCU
does not provide evidence of update-side forward progress by design.)
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/rcupdate.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 00a7fd61b3c6..82973738125b 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -51,7 +51,17 @@ extern int rcu_expedited; /* for sysctl */ | |||
| 51 | extern int rcutorture_runnable; /* for sysctl */ | 51 | extern int rcutorture_runnable; /* for sysctl */ |
| 52 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 52 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
| 53 | 53 | ||
| 54 | enum rcutorture_type { | ||
| 55 | RCU_FLAVOR, | ||
| 56 | RCU_BH_FLAVOR, | ||
| 57 | RCU_SCHED_FLAVOR, | ||
| 58 | SRCU_FLAVOR, | ||
| 59 | INVALID_RCU_FLAVOR | ||
| 60 | }; | ||
| 61 | |||
| 54 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 62 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) |
| 63 | void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags, | ||
| 64 | unsigned long *gpnum, unsigned long *completed); | ||
| 55 | void rcutorture_record_test_transition(void); | 65 | void rcutorture_record_test_transition(void); |
| 56 | void rcutorture_record_progress(unsigned long vernum); | 66 | void rcutorture_record_progress(unsigned long vernum); |
| 57 | void do_trace_rcu_torture_read(const char *rcutorturename, | 67 | void do_trace_rcu_torture_read(const char *rcutorturename, |
| @@ -60,6 +70,15 @@ void do_trace_rcu_torture_read(const char *rcutorturename, | |||
| 60 | unsigned long c_old, | 70 | unsigned long c_old, |
| 61 | unsigned long c); | 71 | unsigned long c); |
| 62 | #else | 72 | #else |
| 73 | static inline void rcutorture_get_gp_data(enum rcutorture_type test_type, | ||
| 74 | int *flags, | ||
| 75 | unsigned long *gpnum, | ||
| 76 | unsigned long *completed) | ||
| 77 | { | ||
| 78 | *flags = 0; | ||
| 79 | *gpnum = 0; | ||
| 80 | *completed = 0; | ||
| 81 | } | ||
| 63 | static inline void rcutorture_record_test_transition(void) | 82 | static inline void rcutorture_record_test_transition(void) |
| 64 | { | 83 | { |
| 65 | } | 84 | } |
