aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
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 /kernel
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcutree.c26
-rw-r--r--kernel/rcutree.h12
-rw-r--r--kernel/rcutree_plugin.h12
3 files changed, 1 insertions, 49 deletions
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