summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRik van Riel <riel@redhat.com>2014-04-26 23:15:35 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-05-14 11:41:05 -0700
commitc8fc8a7f3019acb5616a4a502fe1434e4a22a99d (patch)
treefb6efa893e0cd7de1f44d371586d2f5d2f2df19f /kernel
parentf8766169dafb5897e54a1c786540b20d163971ca (diff)
rcu: Provide API to suppress stall warnings while sysrc runs
Some sysrq handlers can run for a long time, because they dump a lot of data onto a serial console. Having RCU stall warnings pop up in the middle of them only makes the problem worse. This commit provides rcu_sysrq_start() and rcu_sysrq_end() APIs to temporarily suppress RCU CPU stall warnings while a sysrq request is handled. Signed-off-by: Rik van Riel <riel@redhat.com> [ paulmck: Fix TINY_RCU build error. ] Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcu/update.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index ed7a0d72562c..a2aeb4df0f60 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -320,6 +320,18 @@ int rcu_jiffies_till_stall_check(void)
return till_stall_check * HZ + RCU_STALL_DELAY_DELTA;
}
+void rcu_sysrq_start(void)
+{
+ if (!rcu_cpu_stall_suppress)
+ rcu_cpu_stall_suppress = 2;
+}
+
+void rcu_sysrq_end(void)
+{
+ if (rcu_cpu_stall_suppress == 2)
+ rcu_cpu_stall_suppress = 0;
+}
+
static int rcu_panic(struct notifier_block *this, unsigned long ev, void *ptr)
{
rcu_cpu_stall_suppress = 1;