Re: [PATCH] printk: Add loglevel for "do not print to consoles".

From: Tetsuo Handa
Date: Wed May 13 2020 - 03:59:31 EST


On 2020/05/13 15:26, Sergey Senozhatsky wrote:
> Yes, but this looks like it's the consumer of the messages who
> decides what to filter and what not to. rsyslog, dmesg, etc.
> will have different filtering policies. It's not like the kernel
> decides what to hide and what to show. If would compare this to
> NO_CONSOLES, then NO_CONSOLES does a different thing after all.

I just showed an example that changing dump_tasks() messages from
KERN_INFO to KERN_DEBUG is not an option. If dump_tasks() were using
KERN_DEBUG, the consumer of the messages will have to receive all
KERN_DEBUG messages, which needlessly contains uninterested messages.
If dump_tasks() allows use of NO_CONSOLES (via e.g. sysctl switch),
the consumer does not need to receive KERN_DEBUG messages.

What is wrong with adding NO_CONSOLES ?