[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190312210004.GC5982@Haydn>
Date: Tue, 12 Mar 2019 21:00:07 +0000
From: Calvin Owens <calvinowens@...com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
CC: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
Jonathan Corbet <corbet@....net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>
Subject: Re: [PATCH 1/4] printk: Introduce per-console loglevel setting
On Friday 03/08 at 12:10 +0900, Sergey Senozhatsky wrote:
> On (03/01/19 16:48), Calvin Owens wrote:
> [..]
> > msg = log_from_idx(console_idx);
> > - if (suppress_message_printing(msg->level)) {
> > - /*
> > - * Skip record we have buffered and already printed
> > - * directly to the console when we received it, and
> > - * record that has level above the console loglevel.
> > - */
> > - console_idx = log_next(console_idx);
> > - console_seq++;
> > - goto skip;
> > - }
> >
> > /* Output to all consoles once old messages replayed. */
> > if (unlikely(exclusive_console &&
> > @@ -2405,7 +2402,7 @@ void console_unlock(void)
> > console_lock_spinning_enable();
> >
> > 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();
>
> So it seems that now we always format the text and ext message (if
> needed) and only then check if there is at least one console we can
> print that message on.
>
> Can we iterate the consoles first and check if msg is worth
> the effort (per console suppress_message_printing()) and only
> if it is do all the formatting and call console drivers?
Makes sense, will do.
Thanks,
Calvin
> -ss
Powered by blists - more mailing lists