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

From: Petr Mladek
Date: Wed May 13 2020 - 08:19:48 EST


On Wed 2020-05-13 20:24:24, Tetsuo Handa wrote:
> On 2020/05/13 19:49, Michal Hocko wrote:
> > On Wed 13-05-20 12:04:13, Petr Mladek wrote:
> >> What is so special about OOM dump task so that it would deserve such
> >> complications?

> I don't think dump_tasks() is important information to be printed on consoles.
> But since somebody might think dump_tasks() is important information to be
> printed on consoles, I suggest switching KERN_NO_CONSOLES using e.g. sysctl.

You might achieve the same with DEBUG loglevel. Or do I miss anything?

> There is per-console loglevel proposal (which allows selecting "some" console
> backends). But it is based on KERN_$LOGLEVEL which is too rough-grained.

IMHO, developers already have troubles to decide between the existing
8 loglevels. And it is easier because the names describe the severity.

NO_CONSOLES would be different. The effect is almost[*] clear. But only
few people would know the background why it was introduced and where
to use it.

I know that it is meant as a modifier, like LOGLEVEL_SCHED and
KERN_CONT. But this is another reason to avoid it. We already have
huge pain with these two modifiers. They both do not work well.

[*] It will have no effect when it was disabled by a sysfs knob.

Best Regards,
Petr