aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-07-21 11:05:56 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-08-19 20:18:04 -0400
commit910b1b7e19a292ff685001caf1bf1a9775b771a1 (patch)
tree7ec42bf018ab62c3c2180fbe168cd6130556cb80
parent687d7a960aea46e016182c7ce346d62c4dbd0366 (diff)
rcu: Allow RCU CPU stall warnings to be off at boot, but manually enablable
Currently, if RCU CPU stall warnings are enabled, they are enabled immediately upon boot. They can be manually disabled via /sys (and also re-enabled via /sys), and are automatically disabled upon panic. However, some users need RCU CPU stalls to be disabled at boot time, but to be enabled without rebuilding/rebooting. For example, someone running a real-time application in production might not want the additional latency of RCU CPU stall detection in normal operation, but might need to enable it at any point for fault isolation purposes. This commit therefore provides a new CONFIG_RCU_CPU_STALL_DETECTOR_RUNNABLE kernel configuration parameter that maintains the current behavior (enable at boot) by default, but allows a kernel to be configured with RCU CPU stall detection built into the kernel, but disabled at boot time. Requested-by: Clark Williams <williams@redhat.com> Requested-by: John Kacur <jkacur@redhat.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r--kernel/rcutree.c2
-rw-r--r--kernel/rcutree.h6
-rw-r--r--lib/Kconfig.debug13
3 files changed, 20 insertions, 1 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 5d910beefff..5aab7dabd0d 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -144,7 +144,7 @@ module_param(qhimark, int, 0);
144module_param(qlowmark, int, 0); 144module_param(qlowmark, int, 0);
145 145
146#ifdef CONFIG_RCU_CPU_STALL_DETECTOR 146#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
147int rcu_cpu_stall_suppress __read_mostly; 147int rcu_cpu_stall_suppress __read_mostly = RCU_CPU_STALL_SUPPRESS_INIT;
148module_param(rcu_cpu_stall_suppress, int, 0644); 148module_param(rcu_cpu_stall_suppress, int, 0644);
149#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ 149#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
150 150
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index 183ebf40531..bb4d08695c4 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -264,6 +264,12 @@ struct rcu_data {
264 /* scheduling clock irq */ 264 /* scheduling clock irq */
265 /* before ratting on them. */ 265 /* before ratting on them. */
266 266
267#ifdef CONFIG_RCU_CPU_STALL_DETECTOR_RUNNABLE
268#define RCU_CPU_STALL_SUPPRESS_INIT 0
269#else
270#define RCU_CPU_STALL_SUPPRESS_INIT 1
271#endif
272
267#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ 273#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
268 274
269#define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) 275#define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b))
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index b5005b76210..52c2172dff1 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -856,6 +856,19 @@ config RCU_CPU_STALL_TIMEOUT
856 RCU grace period persists, additional CPU stall warnings are 856 RCU grace period persists, additional CPU stall warnings are
857 printed at more widely spaced intervals. 857 printed at more widely spaced intervals.
858 858
859config RCU_CPU_STALL_DETECTOR_RUNNABLE
860 bool "RCU CPU stall checking starts automatically at boot"
861 depends on RCU_CPU_STALL_DETECTOR
862 default y
863 help
864 If set, start checking for RCU CPU stalls immediately on
865 boot. Otherwise, RCU CPU stall checking must be manually
866 enabled.
867
868 Say Y if you are unsure.
869
870 Say N if you wish to suppress RCU CPU stall checking during boot.
871
859config RCU_CPU_STALL_VERBOSE 872config RCU_CPU_STALL_VERBOSE
860 bool "Print additional per-task information for RCU_CPU_STALL_DETECTOR" 873 bool "Print additional per-task information for RCU_CPU_STALL_DETECTOR"
861 depends on RCU_CPU_STALL_DETECTOR && TREE_PREEMPT_RCU 874 depends on RCU_CPU_STALL_DETECTOR && TREE_PREEMPT_RCU