Messages in this thread | | | Date | Fri, 17 Jun 2022 16:41:05 +0200 | From | "Jason A. Donenfeld" <> | 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
| |