[PATCH RFC tip/core/rcu 22/30] rcu: make CPU stall warning timeout configurable

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

Also set the default to 60 seconds, up from the previous hard-coded timeout
of 10 seconds.  This allows people who care to set short timeouts, while
avoiding people with unusual configurations (make randconfig!!!) from being
bothered with spurious CPU stall warnings.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcutree.h  |    5 +++--
 lib/Kconfig.debug |   11 +++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index 14c040b..5d68e17 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -254,9 +254,10 @@ struct rcu_data {
 #define RCU_STALL_DELAY_DELTA	       0
 #endif
 
-#define RCU_SECONDS_TILL_STALL_CHECK   (10 * HZ + RCU_STALL_DELAY_DELTA)
+#define RCU_SECONDS_TILL_STALL_CHECK   (CONFIG_RCU_CPU_STALL_TIMEOUT * HZ + \
+					RCU_STALL_DELAY_DELTA)
 						/* for rsp->jiffies_stall */
-#define RCU_SECONDS_TILL_STALL_RECHECK (30 * HZ + RCU_STALL_DELAY_DELTA)
+#define RCU_SECONDS_TILL_STALL_RECHECK (3 * RCU_SECONDS_TILL_STALL_CHECK + 30)
 						/* for rsp->jiffies_stall */
 #define RCU_STALL_RAT_DELAY		2	/* Allow other CPUs time */
 						/*  to take at least one */
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index a8a272a..af8b9c5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -821,6 +821,17 @@ config RCU_CPU_STALL_DETECTOR
 
 	  Say Y if you are unsure.
 
+config RCU_CPU_STALL_TIMEOUT
+	int "RCU CPU stall timeout in seconds"
+	depends on RCU_CPU_STALL_DETECTOR
+	range 3 300
+	default 60
+	help
+	  If a given RCU grace period extends more than the specified
+	  number of seconds, a CPU stall warning is printed.  If the
+	  RCU grace period persists, additional CPU stall warnings are
+	  printed at more widely spaced intervals.
+
 config RCU_CPU_STALL_VERBOSE
 	bool "Print additional per-task information for RCU_CPU_STALL_DETECTOR"
 	depends on RCU_CPU_STALL_DETECTOR && TREE_PREEMPT_RCU
-- 
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 22/30] rcu: make CPU stall warning ..., 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)