aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutorture.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-04-04 00:33:51 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-06 02:16:56 -0400
commit4a29865689dbb87a02e3b0fff4a4ae5041273173 (patch)
tree72c9f1641a9fb05e3ae4d8cc068f62f9c566bae9 /kernel/rcutorture.c
parentd71df90eadfc35aa549ff9a850842673febca71f (diff)
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 <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutorture.c')
-rw-r--r--kernel/rcutorture.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 22b0e74e7d99..c2f58ec24751 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -131,7 +131,7 @@ struct rcu_torture {
131 131
132static LIST_HEAD(rcu_torture_freelist); 132static LIST_HEAD(rcu_torture_freelist);
133static struct rcu_torture __rcu *rcu_torture_current; 133static struct rcu_torture __rcu *rcu_torture_current;
134static long rcu_torture_current_version; 134static unsigned long rcu_torture_current_version;
135static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN]; 135static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN];
136static DEFINE_SPINLOCK(rcu_torture_lock); 136static DEFINE_SPINLOCK(rcu_torture_lock);
137static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) = 137static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) =
@@ -884,7 +884,7 @@ rcu_torture_writer(void *arg)
884 old_rp->rtort_pipe_count++; 884 old_rp->rtort_pipe_count++;
885 cur_ops->deferred_free(old_rp); 885 cur_ops->deferred_free(old_rp);
886 } 886 }
887 rcu_torture_current_version++; 887 rcutorture_record_progress(++rcu_torture_current_version);
888 oldbatch = cur_ops->completed(); 888 oldbatch = cur_ops->completed();
889 rcu_stutter_wait("rcu_torture_writer"); 889 rcu_stutter_wait("rcu_torture_writer");
890 } while (!kthread_should_stop() && fullstop == FULLSTOP_DONTSTOP); 890 } while (!kthread_should_stop() && fullstop == FULLSTOP_DONTSTOP);
@@ -1064,7 +1064,7 @@ rcu_torture_printk(char *page)
1064 } 1064 }
1065 cnt += sprintf(&page[cnt], "%s%s ", torture_type, TORTURE_FLAG); 1065 cnt += sprintf(&page[cnt], "%s%s ", torture_type, TORTURE_FLAG);
1066 cnt += sprintf(&page[cnt], 1066 cnt += sprintf(&page[cnt],
1067 "rtc: %p ver: %ld tfle: %d rta: %d rtaf: %d rtf: %d " 1067 "rtc: %p ver: %lu tfle: %d rta: %d rtaf: %d rtf: %d "
1068 "rtmbe: %d rtbke: %ld rtbre: %ld " 1068 "rtmbe: %d rtbke: %ld rtbre: %ld "
1069 "rtbf: %ld rtb: %ld nt: %ld", 1069 "rtbf: %ld rtb: %ld nt: %ld",
1070 rcu_torture_current, 1070 rcu_torture_current,
@@ -1325,6 +1325,7 @@ rcu_torture_cleanup(void)
1325 int i; 1325 int i;
1326 1326
1327 mutex_lock(&fullstop_mutex); 1327 mutex_lock(&fullstop_mutex);
1328 rcutorture_record_test_transition();
1328 if (fullstop == FULLSTOP_SHUTDOWN) { 1329 if (fullstop == FULLSTOP_SHUTDOWN) {
1329 printk(KERN_WARNING /* but going down anyway, so... */ 1330 printk(KERN_WARNING /* but going down anyway, so... */
1330 "Concurrent 'rmmod rcutorture' and shutdown illegal!\n"); 1331 "Concurrent 'rmmod rcutorture' and shutdown illegal!\n");
@@ -1616,6 +1617,7 @@ rcu_torture_init(void)
1616 } 1617 }
1617 } 1618 }
1618 register_reboot_notifier(&rcutorture_shutdown_nb); 1619 register_reboot_notifier(&rcutorture_shutdown_nb);
1620 rcutorture_record_test_transition();
1619 mutex_unlock(&fullstop_mutex); 1621 mutex_unlock(&fullstop_mutex);
1620 return 0; 1622 return 0;
1621 1623