diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-02-08 20:14:39 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-06 02:16:54 -0400 |
commit | a00e0d714fbded07a7a2254391ce9ed5a5cb9d82 (patch) | |
tree | 7c213dbf1e2561655d07749b6d689027460fb8cc | |
parent | 0ee5623f9a6e52df90a78bd21179f8ab370e102e (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-INDEX | 2 | ||||
-rw-r--r-- | Documentation/RCU/stallwarn.txt | 23 | ||||
-rw-r--r-- | kernel/rcutree.c | 26 | ||||
-rw-r--r-- | kernel/rcutree.h | 12 | ||||
-rw-r--r-- | kernel/rcutree_plugin.h | 12 | ||||
-rw-r--r-- | lib/Kconfig.debug | 30 |
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 | |||
21 | RTFP.txt | 21 | RTFP.txt |
22 | - List of RCU papers (bibliography) going back to 1980. | 22 | - List of RCU papers (bibliography) going back to 1980. |
23 | stallwarn.txt | 23 | stallwarn.txt |
24 | - RCU CPU stall warnings (CONFIG_RCU_CPU_STALL_DETECTOR) | 24 | - RCU CPU stall warnings (module parameter rcu_cpu_stall_suppress) |
25 | torture.txt | 25 | torture.txt |
26 | - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST) | 26 | - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST) |
27 | trace.txt | 27 | trace.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 @@ | |||
1 | Using RCU's CPU Stall Detector | 1 | Using RCU's CPU Stall Detector |
2 | 2 | ||
3 | The CONFIG_RCU_CPU_STALL_DETECTOR kernel config parameter enables | 3 | The rcu_cpu_stall_suppress module parameter enables RCU's CPU stall |
4 | RCU's CPU stall detector, which detects conditions that unduly delay | 4 | detector, which detects conditions that unduly delay RCU grace periods. |
5 | RCU grace periods. The stall detector's idea of what constitutes | 5 | This module parameter enables CPU stall detection by default, but |
6 | "unduly delayed" is controlled by a set of C preprocessor macros: | 6 | may be overridden via boot-time parameter or at runtime via sysfs. |
7 | The stall detector's idea of what constitutes "unduly delayed" is | ||
8 | controlled by a set of kernel configuration variables and cpp macros: | ||
7 | 9 | ||
8 | RCU_SECONDS_TILL_STALL_CHECK | 10 | CONFIG_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 | ||
14 | RCU_SECONDS_TILL_STALL_RECHECK | 17 | RCU_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 | ||
21 | RCU_STALL_RAT_DELAY | 24 | RCU_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); | |||
140 | module_param(qhimark, int, 0); | 140 | module_param(qhimark, int, 0); |
141 | module_param(qlowmark, int, 0); | 141 | module_param(qlowmark, int, 0); |
142 | 142 | ||
143 | #ifdef CONFIG_RCU_CPU_STALL_DETECTOR | 143 | int rcu_cpu_stall_suppress __read_mostly; |
144 | int rcu_cpu_stall_suppress __read_mostly = RCU_CPU_STALL_SUPPRESS_INIT; | ||
145 | module_param(rcu_cpu_stall_suppress, int, 0644); | 144 | module_param(rcu_cpu_stall_suppress, int, 0644); |
146 | #endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ | ||
147 | 145 | ||
148 | static void force_quiescent_state(struct rcu_state *rsp, int relaxed); | 146 | static void force_quiescent_state(struct rcu_state *rsp, int relaxed); |
149 | static int rcu_pending(int cpu); | 147 | static 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 | |||
455 | int rcu_cpu_stall_suppress __read_mostly; | 451 | int rcu_cpu_stall_suppress __read_mostly; |
456 | 452 | ||
457 | static void record_gp_stall_check_time(struct rcu_state *rsp) | 453 | static 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 | |||
592 | static void record_gp_stall_check_time(struct rcu_state *rsp) | ||
593 | { | ||
594 | } | ||
595 | |||
596 | static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp) | ||
597 | { | ||
598 | } | ||
599 | |||
600 | void rcu_cpu_stall_reset(void) | ||
601 | { | ||
602 | } | ||
603 | |||
604 | static 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); | |||
366 | static void rcu_report_unblock_qs_rnp(struct rcu_node *rnp, | 356 | static 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 | ||
370 | static void rcu_print_detail_task_stall(struct rcu_state *rsp); | 359 | static void rcu_print_detail_task_stall(struct rcu_state *rsp); |
371 | static void rcu_print_task_stall(struct rcu_node *rnp); | 360 | static void rcu_print_task_stall(struct rcu_node *rnp); |
372 | static void rcu_preempt_stall_reset(void); | 361 | static void rcu_preempt_stall_reset(void); |
373 | #endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ | ||
374 | static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp); | 362 | static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp); |
375 | #ifdef CONFIG_HOTPLUG_CPU | 363 | #ifdef CONFIG_HOTPLUG_CPU |
376 | static int rcu_preempt_offline_tasks(struct rcu_state *rsp, | 364 | static 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 | } |
357 | EXPORT_SYMBOL_GPL(__rcu_read_unlock); | 353 | EXPORT_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 | ||
878 | config 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 | |||
891 | config RCU_CPU_STALL_TIMEOUT | 878 | config 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 | ||
902 | config 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 | |||
915 | config RCU_CPU_STALL_VERBOSE | 889 | config 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 |