[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YqySgdH3sGj7o9O8@zx2c4.com>
Date: Fri, 17 Jun 2022 16:41:05 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Petr Mladek <pmladek@...e.com>
Cc: John Ogness <john.ogness@...utronix.de>,
Marco Elver <elver@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: 5.19 printk breaks message ordering
On Fri, Jun 17, 2022 at 04:21:15PM +0200, Petr Mladek wrote:
> In fact, in your case you might get even better synchronization
> if you do it the other way and write userspace messages into
> the kernel log via /dev/kmsg:
>
> echo "Hello world" > /dev/kmsg
The idea is to interleave stderr/stdout properly, as CI has done for
ages, which threaded printk breaks, and which my patch (now posted)
fixes behind a default-off option. You can't dup2 /dev/kmsg to 1 and 2,
as the write() semantics are different, with respect to buffering and
with respect to new lines. The interfaces aren't comparable, so this
isn't quite a solution. (Besides, not breaking things as they currently
exist has a certain benefit.)
Jason
Powered by blists - more mailing lists