aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/rcutiny.h4
-rw-r--r--include/linux/rcutree.h1
-rw-r--r--kernel/rcutree.c20
-rw-r--r--kernel/rcutree.h1
-rw-r--r--kernel/rcutree_plugin.h18
5 files changed, 44 insertions, 0 deletions
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 4cc5eba41616..3fa179784e18 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -178,6 +178,10 @@ static inline void rcu_sched_force_quiescent_state(void)
178{ 178{
179} 179}
180 180
181static inline void rcu_cpu_stall_reset(void)
182{
183}
184
181#ifdef CONFIG_DEBUG_LOCK_ALLOC 185#ifdef CONFIG_DEBUG_LOCK_ALLOC
182 186
183extern int rcu_scheduler_active __read_mostly; 187extern int rcu_scheduler_active __read_mostly;
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index c13b85dd22bc..0726809497ba 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -36,6 +36,7 @@ extern void rcu_sched_qs(int cpu);
36extern void rcu_bh_qs(int cpu); 36extern void rcu_bh_qs(int cpu);
37extern void rcu_note_context_switch(int cpu); 37extern void rcu_note_context_switch(int cpu);
38extern int rcu_needs_cpu(int cpu); 38extern int rcu_needs_cpu(int cpu);
39extern void rcu_cpu_stall_reset(void);
39 40
40#ifdef CONFIG_TREE_PREEMPT_RCU 41#ifdef CONFIG_TREE_PREEMPT_RCU
41 42
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index ff214118e4b8..42140a860bb9 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -565,6 +565,22 @@ static int rcu_panic(struct notifier_block *this, unsigned long ev, void *ptr)
565 return NOTIFY_DONE; 565 return NOTIFY_DONE;
566} 566}
567 567
568/**
569 * rcu_cpu_stall_reset - prevent further stall warnings in current grace period
570 *
571 * Set the stall-warning timeout way off into the future, thus preventing
572 * any RCU CPU stall-warning messages from appearing in the current set of
573 * RCU grace periods.
574 *
575 * The caller must disable hard irqs.
576 */
577void rcu_cpu_stall_reset(void)
578{
579 rcu_sched_state.jiffies_stall = jiffies + ULONG_MAX / 2;
580 rcu_bh_state.jiffies_stall = jiffies + ULONG_MAX / 2;
581 rcu_preempt_stall_reset();
582}
583
568static struct notifier_block rcu_panic_block = { 584static struct notifier_block rcu_panic_block = {
569 .notifier_call = rcu_panic, 585 .notifier_call = rcu_panic,
570}; 586};
@@ -584,6 +600,10 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
584{ 600{
585} 601}
586 602
603void rcu_cpu_stall_reset(void)
604{
605}
606
587static void __init check_cpu_stall_init(void) 607static void __init check_cpu_stall_init(void)
588{ 608{
589} 609}
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index bb4d08695c45..7abd439a7573 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -372,6 +372,7 @@ static void rcu_report_unblock_qs_rnp(struct rcu_node *rnp,
372#ifdef CONFIG_RCU_CPU_STALL_DETECTOR 372#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
373static void rcu_print_detail_task_stall(struct rcu_state *rsp); 373static void rcu_print_detail_task_stall(struct rcu_state *rsp);
374static void rcu_print_task_stall(struct rcu_node *rnp); 374static void rcu_print_task_stall(struct rcu_node *rnp);
375static void rcu_preempt_stall_reset(void);
375#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ 376#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
376static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp); 377static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp);
377#ifdef CONFIG_HOTPLUG_CPU 378#ifdef CONFIG_HOTPLUG_CPU
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 63bb7714fdeb..561410f70d4a 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -417,6 +417,16 @@ static void rcu_print_task_stall(struct rcu_node *rnp)
417 } 417 }
418} 418}
419 419
420/*
421 * Suppress preemptible RCU's CPU stall warnings by pushing the
422 * time of the next stall-warning message comfortably far into the
423 * future.
424 */
425static void rcu_preempt_stall_reset(void)
426{
427 rcu_preempt_state.jiffies_stall = jiffies + ULONG_MAX / 2;
428}
429
420#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ 430#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
421 431
422/* 432/*
@@ -867,6 +877,14 @@ static void rcu_print_task_stall(struct rcu_node *rnp)
867{ 877{
868} 878}
869 879
880/*
881 * Because preemptible RCU does not exist, there is no need to suppress
882 * its CPU stall warnings.
883 */
884static void rcu_preempt_stall_reset(void)
885{
886}
887
870#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ 888#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
871 889
872/* 890/*