From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Michal Hocko <mhocko@suse.com>,
Yafang Shao <laoar.shao@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Roman Gushchin <guro@fb.com>, linux-mm <linux-mm@kvack.org>,
David Rientjes <rientjes@google.com>,
Shakeel Butt <shakeelb@google.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [nacked] mm-oom-avoid-printk-iteration-under-rcu.patch removed from -mm tree
Date: Fri, 24 Apr 2020 00:54:37 +0900 [thread overview]
Message-ID: <20200423155437.GB5385@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <efc649fc-f838-97ea-44a2-882f068d033c@i-love.sakura.ne.jp>
On (20/04/23 22:28), Tetsuo Handa wrote:
[..]
> +/* Annotation for "don't print to consoles". */
> +#define KERN_NO_CONSOLES KERN_SOH "S"
> +
> /* integer equivalents of KERN_<LEVEL> */
> #define LOGLEVEL_SCHED -2 /* Deferred messages from sched code
> * are set to this special level */
> diff --git a/include/linux/printk.h b/include/linux/printk.h
> index e061635e0409..da338b81c2e1 100644
> --- a/include/linux/printk.h
> +++ b/include/linux/printk.h
> @@ -19,6 +19,7 @@ static inline int printk_get_level(const char *buffer)
> switch (buffer[1]) {
> case '0' ... '7':
> case 'c': /* KERN_CONT */
> + case 'S': /* KERN_NO_CONSOLES */
> return buffer[1];
> }
> }
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 9a9b6156270b..ed51641af087 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -361,6 +361,7 @@ static int console_msg_format = MSG_FORMAT_DEFAULT;
> */
>
> enum log_flags {
> + LOG_NO_CONSOLES = 1, /* don't print to consoles */
> LOG_NEWLINE = 2, /* text ended with a newline */
> LOG_CONT = 8, /* text is a fragment of a continuation line */
> };
> @@ -1959,6 +1960,9 @@ int vprintk_store(int facility, int level,
> break;
> case 'c': /* KERN_CONT */
> lflags |= LOG_CONT;
> + break;
> + case 'S': /* KERN_NO_CONSOLES */
> + lflags |= LOG_NO_CONSOLES;
> }
[..]
Hmm. Any chance that those NO_CONSOLE messages overflow logbuf so then
we start losing pending YES_CONSOLE messages?
-ss
next prev parent reply other threads:[~2020-04-23 15:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200131043324.wkArXTf6-%akpm@linux-foundation.org>
2020-04-17 14:33 ` [nacked] mm-oom-avoid-printk-iteration-under-rcu.patch removed from -mm tree Tetsuo Handa
2020-04-17 15:26 ` Michal Hocko
2020-04-18 10:13 ` Tetsuo Handa
2020-04-20 7:33 ` Michal Hocko
2020-04-22 6:40 ` Tetsuo Handa
2020-04-22 6:59 ` Michal Hocko
2020-04-23 5:34 ` Tetsuo Handa
2020-04-23 6:35 ` Yafang Shao
2020-04-23 7:34 ` Michal Hocko
2020-04-23 10:22 ` Yafang Shao
2020-04-23 11:07 ` Michal Hocko
2020-04-23 13:28 ` Tetsuo Handa
2020-04-23 14:06 ` Michal Hocko
2020-04-23 14:14 ` Tetsuo Handa
2020-04-23 14:35 ` Michal Hocko
2020-04-24 13:02 ` Steven Rostedt
2020-04-24 15:18 ` Michal Hocko
2020-04-23 15:54 ` Sergey Senozhatsky [this message]
2020-04-23 22:56 ` Tetsuo Handa
2020-04-24 0:56 ` Yafang Shao
2020-04-24 1:16 ` Tetsuo Handa
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=20200423155437.GB5385@jagdpanzerIV.localdomain \
--to=sergey.senozhatsky@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=laoar.shao@gmail.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=pmladek@suse.com \
--cc=rientjes@google.com \
--cc=rostedt@goodmis.org \
--cc=shakeelb@google.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;
as well as URLs for NNTP newsgroup(s).