All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Rik van Riel <riel@redhat.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Richard Weinberger <richard@nod.at>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-next@vger.kernel.org, umgwanakikbuti@gmail.com
Subject: Re: mmotm 2014-04-24-13-07 uploaded
Date: Tue, 29 Apr 2014 09:36:04 -0700	[thread overview]
Message-ID: <20140429163604.GH8754@linux.vnet.ibm.com> (raw)
In-Reply-To: <535F95FC.1020909@redhat.com>

On Tue, Apr 29, 2014 at 08:07:24AM -0400, Rik van Riel wrote:
> On 04/28/2014 05:15 PM, Paul E. McKenney wrote:
> > On Mon, Apr 28, 2014 at 01:32:38PM -0700, Randy Dunlap wrote:
> >> On 04/28/14 13:06, Paul E. McKenney wrote:
> 
> >>> Please see below for a patch against next-20140428 that makes this build
> >>> for me.  This is derived from Rik's patch, my patch, and is consistent with
> >>> Arnd's patch.
> >>>
> >>> 							Thanx, Paul
> >>
> >> Thnx, works for me.  Finally.
> > 
> > Good!
> > 
> > Rik, how would you like to proceed with this?
> 
> I guess this fix should go into -mm?

Andrew dropped the original patch, so a consolidated patch is needed.
I believe that something like the following is what we ended up with.
Does this look right to you?

							Thanx, Paul

------------------------------------------------------------------------

sysrq,rcu: suppress RCU stall warnings while sysrq 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 patch temporarily disables RCU stall warnings while a sysrq
request is handled.

Signed-off-by: Rik van Riel <riel@redhat.com>
[ paulmck: Fix build bugs for obscure config options. ]
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Joern Engel <joern@logfs.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Madper Xie <cxie@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index fc67a89..38d5f9a 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -46,6 +46,7 @@
 #include <linux/jiffies.h>
 #include <linux/syscalls.h>
 #include <linux/of.h>
+#include <linux/rcupdate.h>
 
 #include <asm/ptrace.h>
 #include <asm/irq_regs.h>
@@ -511,6 +512,7 @@ void __handle_sysrq(int key, bool check_mask)
 	int orig_log_level;
 	int i;
 
+	rcu_sysrq_start();
 	rcu_read_lock();
 	/*
 	 * Raise the apparent loglevel to maximum so that the sysrq header
@@ -554,6 +556,7 @@ void __handle_sysrq(int key, bool check_mask)
 		console_loglevel = orig_log_level;
 	}
 	rcu_read_unlock();
+	rcu_sysrq_end();
 }
 
 void handle_sysrq(int key)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 00a7fd6..f3a672c 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -227,6 +227,17 @@ void rcu_idle_enter(void);
 void rcu_idle_exit(void);
 void rcu_irq_enter(void);
 void rcu_irq_exit(void);
+#ifdef CONFIG_RCU_STALL_COMMON
+void rcu_sysrq_start(void);
+void rcu_sysrq_end(void);
+#else /* #ifdef CONFIG_RCU_STALL_COMMON */
+static inline void rcu_sysrq_start(void)
+{
+}
+static inline void rcu_sysrq_end(void)
+{
+}
+#endif /* #else #ifdef CONFIG_RCU_STALL_COMMON */
 
 #ifdef CONFIG_RCU_USER_QS
 void rcu_user_enter(void);
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 4c0a9b0..d22309c 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;

  reply	other threads:[~2014-04-29 16:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24 20:08 mmotm 2014-04-24-13-07 uploaded akpm
2014-04-24 20:08 ` akpm
2014-04-24 20:08 ` akpm
2014-04-24 22:40 ` Randy Dunlap
2014-04-25  2:49   ` Paul E. McKenney
2014-04-25 11:37     ` Rik van Riel
2014-04-25 13:25     ` Rik van Riel
2014-04-25 14:04   ` Rik van Riel
2014-04-25 20:44     ` Randy Dunlap
2014-04-25 20:52       ` Randy Dunlap
2014-04-27  6:26         ` Paul E. McKenney
2014-04-27 17:27           ` Randy Dunlap
2014-04-27 20:40             ` Randy Dunlap
2014-04-28  0:26               ` Paul E. McKenney
2014-04-28 13:55           ` Paul E. McKenney
2014-04-28 17:17             ` Randy Dunlap
2014-04-28 17:21               ` Richard Weinberger
2014-04-28 20:06                 ` Paul E. McKenney
2014-04-28 20:32                   ` Randy Dunlap
2014-04-28 21:15                     ` Paul E. McKenney
2014-04-28 21:59                       ` Randy Dunlap
2014-04-29 12:07                       ` Rik van Riel
2014-04-29 16:36                         ` Paul E. McKenney [this message]
2014-04-29 17:31                           ` Rik van Riel
2014-04-29 17:45                             ` Paul E. McKenney
2014-04-28 21:39                   ` Paul E. McKenney
2014-04-28 23:05                     ` Andrew Morton
2014-04-28 23:42                       ` Stephen Rothwell
2014-04-24 22:51 ` mmotm 2014-04-24-13-07 uploaded (regulator/arizona-ldo1.c) Randy Dunlap
  -- strict thread matches above, loose matches on Subject: below --
2014-04-24 20:08 mmotm 2014-04-24-13-07 uploaded akpm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140429163604.GH8754@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=richard@nod.at \
    --cc=riel@redhat.com \
    --cc=umgwanakikbuti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.