From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Petr Mladek <pmladek@suse.com>
Cc: John Ogness <john.ogness@linutronix.de>,
Marco Elver <elver@google.com>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH v3] printk: allow direct console printing to be enabled always
Date: Mon, 20 Jun 2022 19:03:30 +0200 [thread overview]
Message-ID: <YrCoYrZy63rPJbEF@zx2c4.com> (raw)
In-Reply-To: <YrCnJTIB/7MexV3K@alley>
Hi Petr,
On Mon, Jun 20, 2022 at 06:58:13PM +0200, Petr Mladek wrote:
> On Mon 2022-06-20 01:33:02, Jason A. Donenfeld wrote:
> > In 5.19, there are some changes in printk message ordering /
> > interleaving which leads to confusion. The most obvious (and benign)
> > example appears on system boot, in which the "Run /init as init process"
> > message gets intermixed with the messages that init actually writes() to
> > stdout. For example, here's a snippet from build.wireguard.com:
> >
> > --- a/lib/Kconfig.debug
> > +++ b/lib/Kconfig.debug
> > @@ -35,6 +35,18 @@ config PRINTK_CALLER
> > no option to enable/disable at the kernel command line parameter or
> > sysfs interface.
> >
> > +config PRINTK_DIRECT
> > + bool "Attempt to flush printk output immediately"
> > + depends on PRINTK
> > + help
> > + Rather than using kthreads for printk output, always attempt to write
> > + to the console immediately. This has performance implications, but
> > + will result in a more faithful ordering and interleaving with other
> > + processes writing to the console.
> > +
> > + Say N here unless you really need this. This may also be controlled
> > + at boot time with printk.direct=0/1.
> > +
>
> I am fine with the patch except for the config option. Is there
> any particular reason why we need it, please?
It's a debug option that I'd like to be able to easily build my CI
kernels with, just like various other debug options.
Jason
> We should be careful to add new build options in general because they
> make building the kernel more complicated. People need to understand
> what each option is about and what they want.
This one doesn't, really. It'd hidden away in the debug menu.
Jason
next prev parent reply other threads:[~2022-06-20 17:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 13:23 5.19 printk breaks message ordering Jason A. Donenfeld
2022-06-17 13:37 ` Jason A. Donenfeld
2022-06-17 13:38 ` [PATCH] printk: allow direct console printing to be enabled always Jason A. Donenfeld
2022-06-19 0:30 ` Randy Dunlap
2022-06-19 8:37 ` Jason A. Donenfeld
2022-06-19 11:05 ` John Ogness
2022-06-19 20:39 ` Jason A. Donenfeld
2022-06-19 20:43 ` [PATCH v2] " Jason A. Donenfeld
2022-06-19 23:17 ` John Ogness
2022-06-19 23:28 ` Jason A. Donenfeld
2022-06-19 23:33 ` [PATCH v3] " Jason A. Donenfeld
2022-06-20 16:58 ` Petr Mladek
2022-06-20 17:03 ` Jason A. Donenfeld [this message]
2022-06-21 9:43 ` David Laight
2022-06-21 9:59 ` Jason A. Donenfeld
2022-06-22 12:55 ` Jason A. Donenfeld
2022-06-20 4:04 ` [PATCH v2] " David Laight
2022-06-20 5:17 ` Sergey Senozhatsky
2022-06-20 7:56 ` Jason A. Donenfeld
2022-06-21 1:34 ` Sergey Senozhatsky
2022-06-21 21:47 ` John Ogness
2022-06-17 14:21 ` 5.19 printk breaks message ordering Petr Mladek
2022-06-17 14:41 ` Jason A. Donenfeld
2022-06-17 15:01 ` David Laight
2022-06-19 8:15 ` John Ogness
2022-06-19 14:24 ` David Laight
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=YrCoYrZy63rPJbEF@zx2c4.com \
--to=jason@zx2c4.com \
--cc=elver@google.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
/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