Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1616528

Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel
Date 2017-04-05 04:20 +0200
Message-ID <tsIIa-4VI-21@gated-at.bofh.it> (permalink)
References <tsFKh-2Zv-5@gated-at.bofh.it> <tsIyu-4Mn-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On (04/05/17 11:08), Sergey Senozhatsky wrote:
[..]
> >  		stop_critical_timings();	/* don't trace print latency */
> > -		call_console_drivers(ext_text, ext_len, text, len);
> > +		call_console_drivers(ext_text, ext_len, text, len, msg->level);
> >  		start_critical_timings();
> >  		printk_safe_exit_irqrestore(flags);
> 
> ok, so the idea is quite clear and reasonable.
> 
> 
> some thoughts,
> we have a system-wide suppress_message_printing() loglevel filtering
> in console_unlock() loop, which sets a limit on loglevel for all of
> the messages - we don't even msg_print_text() if the message has
> suppressible loglevel. and this implicitly restricts per-console
> maxlevels.
> 
> console_unlock()
> {
> 	for (;;) {
> 		...
> skip:
> 
> 		if (suppress_message_printing(msg->level))	// console_loglevel
> 			goto skip;
> 
> 		call_console_drivers(msg->level)
> 			{
> 				if (level > con->maxlevel)	// con loglevel
> 					continue;
> 				...
> 			}
> 	}
> }
> 
> this can be slightly confusing. what do you think?

one more thing.

this per-console filtering ignores... the "ignore_loglevel" param.

early_param("ignore_loglevel", ignore_loglevel_setup);
module_param(ignore_loglevel, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(ignore_loglevel,
		 "ignore loglevel setting (prints all kernel messages to the console)");


my preference would be preserve "ignore_loglevel" behaviour. if
we are forced to 'ignore all loglevel filtering' then we should
do so.

	-ss

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel Calvin Owens <calvinowens@fb.com> - 2017-04-05 01:10 +0200
  [RFC][PATCH 2/2] printk: Add /sys/consoles/${con}/ and maxlevel attribute Calvin Owens <calvinowens@fb.com> - 2017-04-05 01:10 +0200
    Re: [RFC][PATCH 2/2] printk: Add /sys/consoles/${con}/ and maxlevel  attribute Steven Rostedt <rostedt@goodmis.org> - 2017-04-05 05:40 +0200
  Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of  messages by loglevel Joe Perches <joe@perches.com> - 2017-04-05 04:00 +0200
  Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of  messages by loglevel Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-05 04:10 +0200
    Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of  messages by loglevel Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-05 04:20 +0200
      Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of  messages by loglevel Steven Rostedt <rostedt@goodmis.org> - 2017-04-05 05:30 +0200
      Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of  messages by loglevel Petr Mladek <pmladek@suse.com> - 2017-04-05 17:30 +0200
        Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of  messages by loglevel Petr Mladek <pmladek@suse.com> - 2017-04-06 16:10 +0200

csiph-web