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

Petr Mladek
2022-07-11T08:32:20Z

On Fri 2022-07-08 21:10:35, John Ogness wrote:
> On 2022-07-08, Petr Mladek <pmladek@suse.com> 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