Re: Do not delay boot when printing log to serial console during startup?

From: Sergey Senozhatsky
Date: Tue Oct 11 2022 - 05:50:52 EST


On (22/10/11 11:03), Paul Menzel wrote:
>
> We boot our systems generally with the serial console enabled
> `console=ttyS0,115200n8`, and noticed that initializing the console takes at
> least one second.

[..]

> So it looks to me like, that the already recorded messages are printed out
> over the serial console first, before it continues. The documentation of
> `register_console()` in `kernel/printk/printk.c` confirms that:

I guess your console has CON_PRINTBUFFER flag set, so we flush all
pending kernel messages on this console after registration. Off the
top of my head, you might want to play with the default console loglevel
so that we will suppress printing of most of the messages.