Re: design: was: Re: [RFC PATCH v2] printk: console: Allow each console to have its own loglevel

From: Petr Mladek
Date: Mon Jul 11 2022 - 04:32:20 EST


On Fri 2022-07-08 21:10:35, John Ogness wrote:
> On 2022-07-08, Petr Mladek <pmladek@xxxxxxxx> wrote:
> > The console-specific loglevel might be set by:
> >
> > + "console=device,options/loglevel" kernel parameter at boot time
>
> I ask if we avoid the use of "/loglevel" and instead use a generic
> scheme of:
>
> console=device,option,option,option
>
> Of course, it would mean that the type of option would need to be
> specified. Something like:
>
> console=ttyS0,115200n8,loglevel=3

I like this. It is longer but it makes the meaning very obvious.

I just think about using ':' instead of '=' to distinguish
the assignment of outer 'console' vs the inner 'loglevel' parameters.

It seems to be used in some cases, for example, for ca_keys, crashkernel,
drm.edid_firmware, efi_fake_mem. Even earlyprintk uses it for
bus:device.function.

> The reason why I make such a request is because I would like to be able
> to support disabling threading for certain consoles. Something like:
>
> console=ttyS0,115200n8,nothread
>
> or when we have atomic consoles that we can specify that they are always
> used with a "sync" option:
>
> console=ttyS0,115200n8,sync

Good point.

Best Regards,
Petr