[PATCH RFC tip/core/rcu 29/30] rcu: add boot parameter to suppress RCU CPU stall warning messages

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Wednesday, July 14, 2010 - 1:10 pm

Although the RCU CPU stall warning messages are a very good way to alert
people to a problem, once alerted, it is sometimes helpful to shut them
off in order to avoid obscuring other messages that might be being used
to track down the problem.  Although you can rebuild the kernel with
CONFIG_RCU_CPU_STALL_DETECTOR=n, this is sometimes inconvenient.  This
commit therefore adds a boot parameter named "rcu_cpu_stall_suppress"
that shuts these messages off without requiring a rebuild (though a
reboot might be needed for those not brave enough to patch their kernel
while it is running).

This message-suppression was already in place for the panic case, so this
commit need only rename the variable and export it via module_param().

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcutree.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 5b1c3c2..f3d5906 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -143,6 +143,11 @@ module_param(blimit, int, 0);
 module_param(qhimark, int, 0);
 module_param(qlowmark, int, 0);
 
+#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
+int rcu_cpu_stall_suppress __read_mostly;
+module_param(rcu_cpu_stall_suppress, int, 0);
+#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
+
 static void force_quiescent_state(struct rcu_state *rsp, int relaxed);
 static int rcu_pending(int cpu);
 
@@ -450,7 +455,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
 
 #ifdef CONFIG_RCU_CPU_STALL_DETECTOR
 
-int rcu_cpu_stall_panicking __read_mostly;
+int rcu_cpu_stall_suppress __read_mostly;
 
 static void record_gp_stall_check_time(struct rcu_state *rsp)
 {
@@ -530,7 +535,7 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
 	long delta;
 	struct rcu_node *rnp;
 
-	if (rcu_cpu_stall_panicking)
+	if (rcu_cpu_stall_suppress)
 		return;
 	delta = jiffies - rsp->jiffies_stall;
 	rnp = rdp->mynode;
@@ -548,7 +553,7 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
 
 static int rcu_panic(struct notifier_block *this, unsigned long ev, void *ptr)
 {
-	rcu_cpu_stall_panicking = 1;
+	rcu_cpu_stall_suppress = 1;
 	return NOTIFY_DONE;
 }
 
-- 
1.7.0.6

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC tip/core/rcu 04/30] cgroups: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 05/30] credentials: rcu annotation, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 06/30] keys: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 07/30] nfs: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 08/30] net: __rcu annotations for ..., Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 09/30] perf_event: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 10/30] notifiers: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 11/30] radix-tree: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 0/30] RCU commits queued for 2.6.36/7, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 12/30] idr: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 13/30] input: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 15/30] kvm: add __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 16/30] kernel: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 17/30] net: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 18/30] kvm: more __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 19/30] vhost: add __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 23/30] rcu head remove init, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 26/30] rcu: simplify the usage of ..., Paul E. McKenney, (Wed Jul 14, 1:10 pm)
[PATCH RFC tip/core/rcu 29/30] rcu: add boot parameter to ..., Paul E. McKenney, (Wed Jul 14, 1:10 pm)
[PATCH RFC tip/core/rcu 30/30] rcu: improve kerneldoc for ..., Paul E. McKenney, (Wed Jul 14, 1:10 pm)
Re: [PATCH RFC tip/core/rcu 07/30] nfs: __rcu annotations, Trond Myklebust, (Wed Jul 14, 3:07 pm)