Re: [PATCH] printk: Add loglevel for "do not print to consoles".
From: Joe Perches
Date: Wed May 06 2020 - 21:02:42 EST
On Thu, 2020-05-07 at 09:50 +0900, Tetsuo Handa wrote:
> On 2020/05/07 0:26, Joe Perches wrote:
> > On Wed, 2020-05-06 at 18:45 +0900, Tetsuo Handa wrote:
> > > On 2020/04/28 20:33, Tetsuo Handa wrote:
> > > > On 2020/04/27 15:21, Sergey Senozhatsky wrote:
> > > > > > KERN_NO_CONSOLES is for type of messages where "saved for later analysis" is
> > > > > > important but "printed for immediate notification" is not important.
> > > > > > In other words, KERN_NO_CONSOLES is NOT for dying messages where "printed for
> > > > > > immediate notification" is important.
> > > > >
> > > > > per-console loglevel is a user configurable parameter.
> > > > > KERN_NO_CONSOLES is a hard-coded policy.
> > > >
> > > > But given that whether to use KERN_NO_CONSOLES is configurable via e.g. sysctl,
> > > > KERN_NO_CONSOLES will become a user configurable parameter. What's still wrong?
> > > >
> > >
> > > Any problems remaining?
> >
> > printk_get_level / printk_skip_level and the various
> > uses of %pV using printk_get_level
> >
>
> Excuse me, but what do you mean?
>
> I wish printk() accepts "loglevel" argument detached from "fmt" argument (e.g.
I think that's a bad idea as it would expand
_every_ use of printk with another argument
and overall code size would increase for very
little value.
And do look at the code and uses of printk_get_level.