From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Rik van Riel <riel@redhat.com>
Cc: Jiri Kosina <jkosina@suse.cz>,
linux-kernel@vger.kernel.org, joern@logfs.org,
peterz@infradead.org, Andrew Morton <akpm@linux-foundation.org>,
cxie@redhat.com, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>
Subject: Re: [PATCH RFC] sysrq,rcu: suppress RCU stall warnings while sysrq runs
Date: Thu, 24 Apr 2014 08:16:00 -0700 [thread overview]
Message-ID: <20140424151600.GM4496@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140424090452.3482f95c@annuminas.surriel.com>
On Thu, Apr 24, 2014 at 09:04:52AM -0400, Rik van Riel wrote:
> As suggested by Paul McKenney...
>
> This seems small and simple enough that it should not introduce any
> extra maintenance work in the future.
>
> ---8<---
>
> 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>
> Suggested-by: Paul McKenney <paulmck@linux.vnet.ibm.com>
I guess this means you like the idea. ;-)
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> ---
> drivers/tty/sysrq.c | 2 ++
> include/linux/rcupdate.h | 2 ++
> kernel/rcu/update.c | 11 +++++++++++
> 3 files changed, 15 insertions(+)
>
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> index 3c61e9b..dd53af9 100644
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -511,6 +511,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 +555,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..b9a95f8 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -227,6 +227,8 @@ void rcu_idle_enter(void);
> void rcu_idle_exit(void);
> void rcu_irq_enter(void);
> void rcu_irq_exit(void);
> +void rcu_sysrq_start(void);
> +void rcu_sysrq_end(void);
>
> #ifdef CONFIG_RCU_USER_QS
> void rcu_user_enter(void);
> diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
> index 4c0a9b0..2ac3289 100644
> --- a/kernel/rcu/update.c
> +++ b/kernel/rcu/update.c
> @@ -320,6 +320,17 @@ int rcu_jiffies_till_stall_check(void)
> return till_stall_check * HZ + RCU_STALL_DELAY_DELTA;
> }
>
> +void rcu_sysrq_start(void)
> +{
> + 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;
>
next prev parent reply other threads:[~2014-04-24 16:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-23 16:53 [PATCH RFC] sysrq: rcu-ify __handle_sysrq Rik van Riel
2014-04-23 20:04 ` Andrew Morton
2014-04-23 20:44 ` Rik van Riel
2014-04-23 21:39 ` Jiri Kosina
2014-04-23 21:41 ` Andrew Morton
2014-04-23 21:44 ` Jiri Kosina
2014-04-23 21:49 ` Andrew Morton
2014-04-23 21:37 ` Jiri Kosina
2014-04-23 21:42 ` Rik van Riel
2014-04-23 21:51 ` Jiri Kosina
2014-04-24 1:46 ` Paul E. McKenney
2014-04-24 13:04 ` [PATCH RFC] sysrq,rcu: suppress RCU stall warnings while sysrq runs Rik van Riel
2014-04-24 15:16 ` Paul E. McKenney [this message]
2014-04-25 5:35 ` Mike Galbraith
2014-04-24 0:52 ` [PATCH RFC] sysrq: rcu-ify __handle_sysrq Jörn Engel
2014-04-24 19:40 ` [PATCH] printk: Print cpu number along with time Jörn Engel
2014-04-24 19:58 ` Greg Kroah-Hartman
2014-04-24 21:23 ` Jörn Engel
2014-04-24 22:12 ` Jiri Kosina
2014-04-24 22:18 ` David Rientjes
2014-04-24 22:21 ` Jiri Kosina
2014-04-24 23:29 ` Jörn Engel
2014-04-24 22:20 ` Greg Kroah-Hartman
2014-04-28 23:40 ` Jörn Engel
2014-04-29 0:22 ` Andrew Morton
2014-06-04 23:15 ` Jörn Engel
2014-06-04 23:28 ` Andrew Morton
2014-06-04 23:49 ` Jörn Engel
2014-09-09 17:16 ` Jörn Engel
2014-09-10 21:26 ` Andrew Morton
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=20140424151600.GM4496@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=cxie@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jkosina@suse.cz \
--cc=joern@logfs.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=riel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox