Re: [RFC 1/2] printk: Add kernel parameter: mute_console
From: Guenter Roeck
Date: Thu Oct 22 2020 - 10:15:33 EST
On 10/22/20 6:10 AM, John Ogness wrote:
> On 2020-10-22, Petr Mladek <pmladek@xxxxxxxx> wrote:
>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>> index 02d4adbf98d2..52b9e7f5468d 100644
>> --- a/Documentation/admin-guide/kernel-parameters.txt
>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>> @@ -2974,6 +2974,12 @@
>> Used for mtrr cleanup. It is spare mtrr entries number.
>> Set to 2 or more if your graphical card needs more.
>>
>> + mute_console [KNL]
>> + Completely disable printing of kernel messages to
>> + the console. It can still be used as stdin, stdout,
"to all consoles"
>> + and stderr for the init process. Also it can be used
>> + for login.
>
> IMHO it would make more sense for this to be a console option:
>
> console=ttyS0,115200,mute
>
> Then other consoles could still exist that are not muted.
>
Then why specify this console in the first place ?
> On a side note, I am considering proposing something similar for my
> printk-rework efforts. Once console printers are moved to kthreads, some
> users may not care about latencies and instead prefer synchronous
> printing. My idea for this is to provide a "sync" option for the
> console:
>
> console=ttyS0,115200,sync
>
The whole point of the exercise is to disable all consoles, including default
ones which are not explicitly specified on the command line. The above would
mean that each potential console would have to be muted. That isn't really
scalable for a build system which has to handle many different console devices.
Guenter