public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: dwalker@fifo99.com
To: "Bruno Prémont" <bonbons@linux-vserver.org>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] printk: add per console loglevel
Date: Sun, 4 Jan 2015 20:19:45 +0000	[thread overview]
Message-ID: <20150104201945.GA15792@fifo99.com> (raw)
In-Reply-To: <20141223221324.11d00624@neptune.home>

On Tue, Dec 23, 2014 at 10:13:24PM +0100, Bruno Prémont wrote:
> On Tue, 23 December 2014 dwalker@fifo99.com wrote:
> > On Sun, Dec 21, 2014 at 07:47:53PM +0100, Bruno Prémont wrote:
> > > On Sat, 20 December 2014 dwalker@fifo99.com wrote:
> > > > This adds to to the console= command line options allowing the
> > > > addition of a per console log level setting.
> > > > 
> > > > examples,
> > > > 
> > > > 	console=ttyS0,ll4
> > > > 	console=tty0,ll6
> > > > 
> > > > This can be used on systems which have multiple serial consoles, but
> > > > it's desired for logging to be light on one and heavy on another.
> > > 
> > > Looks useful to me.
> > > What would be the best way to make these per-console loglevels
> > > configurable at runtime? `dmesg -n $LEVEL` only affects the global
> > > limit.
> > > 
> > > One drawback to letting global loglevel have precedence is that
> > > all consoles that should not get detailed log messages need to have
> > > their loglevel explicitly lowered and it's not possible to have
> > > one console forced to show more than the global loglevel.
> > 
> > Right, reason for the patch.
> >  
> > > 
> > > An approach I would prefer is to have all consoles follow global
> > > loglevel except when something different had been explicitly requested
> > > for them.
> > 
> > This patch is mostly like this. It breaks down when you set the "llX"
> > parameter to something above KERN_NOTICE, and the global one is also
> > set above that.
> 
> In your patch global filter applies first, then what passes global filter
> gets filtered with the per-console filter.
> 
> So I can't have `dmesg -n 3` and "console=ttyS0,ll8 console=tty0"
> to get my debugging output over serial console.

Yeah .. This would improve things. I changed it after I sent the first patch, but it
looks like one of your patches changes it also.

I was a little concerned about altering the fast path in call_console_drivers().. With
the changes I made each call into call_console_drivers is forced to go thru the whole list
of consoles, instead of short circuiting prior to the list.
 
I was thinking the max local and global log level could be saved and used for short circuiting
instead of using the global log level.

> > > This way a single console can be added later on (e.g. netconsole)
> > > and set to pass through debug messages without affecting anyone else.
> 
> Netconsole console can be added at any time when system is running
> either through loading of its module or using dynamic configuration
> via configfs.
> 
> See also my patches.

Yeah, I saw them .. Not in too much detail, but it seems worth while for it to
work with netconsole.

Daniel

  reply	other threads:[~2015-01-04 20:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-20 22:49 [PATCH] printk: add per console loglevel dwalker
2014-12-21 18:47 ` Bruno Prémont
2014-12-21 19:03   ` Joe Perches
2014-12-22  1:49     ` Lennart Sorensen
2014-12-23 16:11     ` dwalker
2014-12-23 16:20   ` dwalker
2014-12-23 21:13     ` Bruno Prémont
2015-01-04 20:19       ` dwalker [this message]
2014-12-23 21:22 ` [PATCH 1/3] printk: Use a flag to indicate console-private loglevel Bruno Prémont
2014-12-23 21:27 ` [PATCH 2/3] netconsole: make loglevel configurable per target Bruno Prémont
2014-12-23 21:37 ` [PATCH 3/3] netconsole: New console flag to dump full log buffer Bruno Prémont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150104201945.GA15792@fifo99.com \
    --to=dwalker@fifo99.com \
    --cc=akpm@linux-foundation.org \
    --cc=bonbons@linux-vserver.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox