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

From: Michal Hocko
Date: Wed May 13 2020 - 06:49:44 EST


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?

Nothing really. Except for the potential amount of the output. But as
you've said there are two ways around that. Disable this output if you
do not need it or make it a lower loglevel. A completely different
method of tagging messages just to distinguish different backends of the
printk ring buffers sounds like a bad idea to me because it a) adds a
policy to the kernel and b) it makes it incredibly hard to judge when to
use such a feature. I simply cannot tell whether somebody considers
dump_tasks an important information to be printed on consoles.

If there is any need to control which messages should be routed to which
backend then the proper solution would be to filter messages per log
level per backend. But I have no idea how feasible this is for the
existing infrastructure - or maybe it already exists...
--
Michal Hocko
SUSE Labs