aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-02-08 20:14:39 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-06 02:16:54 -0400
commita00e0d714fbded07a7a2254391ce9ed5a5cb9d82 (patch)
tree7c213dbf1e2561655d07749b6d689027460fb8cc
parent0ee5623f9a6e52df90a78bd21179f8ab370e102e (diff)
rcu: Remove conditional compilation for RCU CPU stall warnings
The RCU CPU stall warnings can now be controlled using the rcu_cpu_stall_suppress boot-time parameter or via the same parameter from sysfs. There is therefore no longer any reason to have kernel config parameters for this feature. This commit therefore removes the RCU_CPU_STALL_DETECTOR and RCU_CPU_STALL_DETECTOR_RUNNABLE kernel config parameters. The RCU_CPU_STALL_TIMEOUT parameter remains to allow the timeout to be tuned and the RCU_CPU_STALL_VERBOSE parameter remains to allow task-stall information to be suppressed if desired. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r--Documentation/RCU/00-INDEX2
-rw-r--r--Documentation/RCU/stallwarn.txt23
-rw-r--r--kernel/rcutree.c26
-rw-r--r--kernel/rcutree.h12
-rw-r--r--kernel/rcutree_plugin.h12
-rw-r--r--lib/Kconfig.debug30
6 files changed, 17 insertions, 88 deletions
diff --git a/Documentation/RCU/00-INDEX b/Documentation/RCU/00-INDEX
index 71b6f500ddb9..1d7a885761f5 100644
--- a/Documentation/RCU/00-INDEX
+++ b/Documentation/RCU/00-INDEX
@@ -21,7 +21,7 @@ rcu.txt
21RTFP.txt 21RTFP.txt
22 - List of RCU papers (bibliography) going back to 1980. 22 - List of RCU papers (bibliography) going back to 1980.
23stallwarn.txt 23stallwarn.txt
24 - RCU CPU stall warnings (CONFIG_RCU_CPU_STALL_DETECTOR) 24 - RCU CPU stall warnings (module parameter rcu_cpu_stall_suppress)
25torture.txt 25torture.txt
26 - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST) 26 - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST)
27trace.txt 27trace.txt
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index 862c08ef1fde..4e959208f736 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -1,22 +1,25 @@
1Using RCU's CPU Stall Detector 1Using RCU's CPU Stall Detector
2 2
3The CONFIG_RCU_CPU_STALL_DETECTOR kernel config parameter enables 3The rcu_cpu_stall_suppress module parameter enables RCU's CPU stall
4RCU's CPU stall detector, which detects conditions that unduly delay 4detector, which detects conditions that unduly delay RCU grace periods.
5RCU grace periods. The stall detector's idea of what constitutes 5This module parameter enables CPU stall detection by default, but
6"unduly delayed" is controlled by a set of C preprocessor macros: 6may be overridden via boot-time parameter or at runtime via sysfs.
7The stall detector's idea of what constitutes "unduly delayed" is
8controlled by a set of kernel configuration variables and cpp macros:
7 9
8RCU_SECONDS_TILL_STALL_CHECK 10CONFIG_RCU_CPU_STALL_TIMEOUT
9 11
10 This macro defines the period of time that RCU will wait from 12 This kernel configuration parameter defines the period of time
11 the beginning of a grace period until it issues an RCU CPU 13 that RCU will wait from the beginning of a grace period until it
12 stall warning. This time period is normally ten seconds. 14 issues an RCU CPU stall warning. This time period is normally
15 ten seconds.
13 16
14RCU_SECONDS_TILL_STALL_RECHECK 17RCU_SECONDS_TILL_STALL_RECHECK
15 18
16 This macro defines the period of time that RCU will wait after 19 This macro defines the period of time that RCU will wait after
17 issuing a stall warning until it issues another stall warning 20 issuing a stall warning until it issues another stall warning
18 for the same stall. This time period is normally set to thirty 21 for the same stall. This time period is normally set to three
19 seconds. 22 times the check interval plus thirty seconds.
20 23
21RCU_STALL_RAT_DELAY 24RCU_STALL_RAT_DELAY
22 25
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index dd4aea806f8e..18f7a593d4c7 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -140,10 +140,8 @@ module_param(blimit, int, 0);
140module_param(qhimark, int, 0); 140module_param(qhimark, int, 0);
141module_param(qlowmark, int, 0); 141module_param(qlowmark, int, 0);
142 142
143#ifdef CONFIG_RCU_CPU_STALL_DETECTOR 143int rcu_cpu_stall_suppress __read_mostly;
144int rcu_cpu_stall_suppress __read_mostly = RCU_CPU_STALL_SUPPRESS_INIT;
145module_param(rcu_cpu_stall_suppress, int, 0644); 144module_param(rcu_cpu_stall_suppress, int, 0644);
146#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
147 145
148static void force_quiescent_state(struct rcu_state *rsp, int relaxed); 146static void force_quiescent_state(struct rcu_state *rsp, int relaxed);
149static int rcu_pending(int cpu); 147static int rcu_pending(int cpu);
@@ -450,8 +448,6 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
450 448
451#endif /* #else #ifdef CONFIG_NO_HZ */ 449#endif /* #else #ifdef CONFIG_NO_HZ */
452 450
453#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
454
455int rcu_cpu_stall_suppress __read_mostly; 451int rcu_cpu_stall_suppress __read_mostly;
456 452
457static void record_gp_stall_check_time(struct rcu_state *rsp) 453static void record_gp_stall_check_time(struct rcu_state *rsp)
@@ -587,26 +583,6 @@ static void __init check_cpu_stall_init(void)
587 atomic_notifier_chain_register(&panic_notifier_list, &rcu_panic_block); 583 atomic_notifier_chain_register(&panic_notifier_list, &rcu_panic_block);
588} 584}
589 585
590#else /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
591
592static void record_gp_stall_check_time(struct rcu_state *rsp)
593{
594}
595
596static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
597{
598}
599
600void rcu_cpu_stall_reset(void)
601{
602}
603
604static void __init check_cpu_stall_init(void)
605{
606}
607
608#endif /* #else #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
609
610/* 586/*
611 * Update CPU-local rcu_data state to record the newly noticed grace period. 587 * Update CPU-local rcu_data state to record the newly noticed grace period.
612 * This is used both when we started the grace period and when we notice 588 * This is used both when we started the grace period and when we notice
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index e8f057e44e3e..e1a6663c0155 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -254,7 +254,6 @@ struct rcu_data {
254#endif /* #else #ifdef CONFIG_NO_HZ */ 254#endif /* #else #ifdef CONFIG_NO_HZ */
255 255
256#define RCU_JIFFIES_TILL_FORCE_QS 3 /* for rsp->jiffies_force_qs */ 256#define RCU_JIFFIES_TILL_FORCE_QS 3 /* for rsp->jiffies_force_qs */
257#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
258 257
259#ifdef CONFIG_PROVE_RCU 258#ifdef CONFIG_PROVE_RCU
260#define RCU_STALL_DELAY_DELTA (5 * HZ) 259#define RCU_STALL_DELAY_DELTA (5 * HZ)
@@ -272,13 +271,6 @@ struct rcu_data {
272 /* scheduling clock irq */ 271 /* scheduling clock irq */
273 /* before ratting on them. */ 272 /* before ratting on them. */
274 273
275#ifdef CONFIG_RCU_CPU_STALL_DETECTOR_RUNNABLE
276#define RCU_CPU_STALL_SUPPRESS_INIT 0
277#else
278#define RCU_CPU_STALL_SUPPRESS_INIT 1
279#endif
280
281#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
282 274
283/* 275/*
284 * RCU global state, including node hierarchy. This hierarchy is 276 * RCU global state, including node hierarchy. This hierarchy is
@@ -325,12 +317,10 @@ struct rcu_state {
325 /* due to lock unavailable. */ 317 /* due to lock unavailable. */
326 unsigned long n_force_qs_ngp; /* Number of calls leaving */ 318 unsigned long n_force_qs_ngp; /* Number of calls leaving */
327 /* due to no GP active. */ 319 /* due to no GP active. */
328#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
329 unsigned long gp_start; /* Time at which GP started, */ 320 unsigned long gp_start; /* Time at which GP started, */
330 /* but in jiffies. */ 321 /* but in jiffies. */
331 unsigned long jiffies_stall; /* Time at which to check */ 322 unsigned long jiffies_stall; /* Time at which to check */
332 /* for CPU stalls. */ 323 /* for CPU stalls. */
333#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
334 char *name; /* Name of structure. */ 324 char *name; /* Name of structure. */
335}; 325};
336 326
@@ -366,11 +356,9 @@ static int rcu_preempted_readers(struct rcu_node *rnp);
366static void rcu_report_unblock_qs_rnp(struct rcu_node *rnp, 356static void rcu_report_unblock_qs_rnp(struct rcu_node *rnp,
367 unsigned long flags); 357 unsigned long flags);
368#endif /* #ifdef CONFIG_HOTPLUG_CPU */ 358#endif /* #ifdef CONFIG_HOTPLUG_CPU */
369#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
370static void rcu_print_detail_task_stall(struct rcu_state *rsp); 359static void rcu_print_detail_task_stall(struct rcu_state *rsp);
371static void rcu_print_task_stall(struct rcu_node *rnp); 360static void rcu_print_task_stall(struct rcu_node *rnp);
372static void rcu_preempt_stall_reset(void); 361static void rcu_preempt_stall_reset(void);
373#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
374static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp); 362static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp);
375#ifdef CONFIG_HOTPLUG_CPU 363#ifdef CONFIG_HOTPLUG_CPU
376static int rcu_preempt_offline_tasks(struct rcu_state *rsp, 364static int rcu_preempt_offline_tasks(struct rcu_state *rsp,
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index a3638710dc67..38426ef1bcd6 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -54,10 +54,6 @@ static void __init rcu_bootup_announce_oddness(void)
54#ifdef CONFIG_RCU_TORTURE_TEST_RUNNABLE 54#ifdef CONFIG_RCU_TORTURE_TEST_RUNNABLE
55 printk(KERN_INFO "\tRCU torture testing starts during boot.\n"); 55 printk(KERN_INFO "\tRCU torture testing starts during boot.\n");
56#endif 56#endif
57#ifndef CONFIG_RCU_CPU_STALL_DETECTOR
58 printk(KERN_INFO
59 "\tRCU-based detection of stalled CPUs is disabled.\n");
60#endif
61#if defined(CONFIG_TREE_PREEMPT_RCU) && !defined(CONFIG_RCU_CPU_STALL_VERBOSE) 57#if defined(CONFIG_TREE_PREEMPT_RCU) && !defined(CONFIG_RCU_CPU_STALL_VERBOSE)
62 printk(KERN_INFO "\tVerbose stalled-CPUs detection is disabled.\n"); 58 printk(KERN_INFO "\tVerbose stalled-CPUs detection is disabled.\n");
63#endif 59#endif
@@ -356,8 +352,6 @@ void __rcu_read_unlock(void)
356} 352}
357EXPORT_SYMBOL_GPL(__rcu_read_unlock); 353EXPORT_SYMBOL_GPL(__rcu_read_unlock);
358 354
359#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
360
361#ifdef CONFIG_RCU_CPU_STALL_VERBOSE 355#ifdef CONFIG_RCU_CPU_STALL_VERBOSE
362 356
363/* 357/*
@@ -430,8 +424,6 @@ static void rcu_preempt_stall_reset(void)
430 rcu_preempt_state.jiffies_stall = jiffies + ULONG_MAX / 2; 424 rcu_preempt_state.jiffies_stall = jiffies + ULONG_MAX / 2;
431} 425}
432 426
433#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
434
435/* 427/*
436 * Check that the list of blocked tasks for the newly completed grace 428 * Check that the list of blocked tasks for the newly completed grace
437 * period is in fact empty. It is a serious bug to complete a grace 429 * period is in fact empty. It is a serious bug to complete a grace
@@ -862,8 +854,6 @@ static void rcu_report_unblock_qs_rnp(struct rcu_node *rnp, unsigned long flags)
862 854
863#endif /* #ifdef CONFIG_HOTPLUG_CPU */ 855#endif /* #ifdef CONFIG_HOTPLUG_CPU */
864 856
865#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
866
867/* 857/*
868 * Because preemptable RCU does not exist, we never have to check for 858 * Because preemptable RCU does not exist, we never have to check for
869 * tasks blocked within RCU read-side critical sections. 859 * tasks blocked within RCU read-side critical sections.
@@ -888,8 +878,6 @@ static void rcu_preempt_stall_reset(void)
888{ 878{
889} 879}
890 880
891#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
892
893/* 881/*
894 * Because there is no preemptable RCU, there can be no readers blocked, 882 * Because there is no preemptable RCU, there can be no readers blocked,
895 * so there is no need to check for blocked tasks. So check only for 883 * so there is no need to check for blocked tasks. So check only for
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c768bcdda1b7..93ce6de3300d 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -875,22 +875,9 @@ config RCU_TORTURE_TEST_RUNNABLE
875 Say N here if you want the RCU torture tests to start only 875 Say N here if you want the RCU torture tests to start only
876 after being manually enabled via /proc. 876 after being manually enabled via /proc.
877 877
878config RCU_CPU_STALL_DETECTOR
879 bool "Check for stalled CPUs delaying RCU grace periods"
880 depends on TREE_RCU || TREE_PREEMPT_RCU
881 default y
882 help
883 This option causes RCU to printk information on which
884 CPUs are delaying the current grace period, but only when
885 the grace period extends for excessive time periods.
886
887 Say N if you want to disable such checks.
888
889 Say Y if you are unsure.
890
891config RCU_CPU_STALL_TIMEOUT 878config RCU_CPU_STALL_TIMEOUT
892 int "RCU CPU stall timeout in seconds" 879 int "RCU CPU stall timeout in seconds"
893 depends on RCU_CPU_STALL_DETECTOR 880 depends on TREE_RCU || TREE_PREEMPT_RCU
894 range 3 300 881 range 3 300
895 default 60 882 default 60
896 help 883 help
@@ -899,22 +886,9 @@ config RCU_CPU_STALL_TIMEOUT
899 RCU grace period persists, additional CPU stall warnings are 886 RCU grace period persists, additional CPU stall warnings are
900 printed at more widely spaced intervals. 887 printed at more widely spaced intervals.
901 888
902config RCU_CPU_STALL_DETECTOR_RUNNABLE
903 bool "RCU CPU stall checking starts automatically at boot"
904 depends on RCU_CPU_STALL_DETECTOR
905 default y
906 help
907 If set, start checking for RCU CPU stalls immediately on
908 boot. Otherwise, RCU CPU stall checking must be manually
909 enabled.
910
911 Say Y if you are unsure.
912
913 Say N if you wish to suppress RCU CPU stall checking during boot.
914
915config RCU_CPU_STALL_VERBOSE 889config RCU_CPU_STALL_VERBOSE
916 bool "Print additional per-task information for RCU_CPU_STALL_DETECTOR" 890 bool "Print additional per-task information for RCU_CPU_STALL_DETECTOR"
917 depends on RCU_CPU_STALL_DETECTOR && TREE_PREEMPT_RCU 891 depends on TREE_PREEMPT_RCU
918 default y 892 default y
919 help 893 help
920 This option causes RCU to printk detailed per-task information 894 This option causes RCU to printk detailed per-task information