From: Calvin Owens <calvinowens@fb.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
Jonathan Corbet <corbet@lwn.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH 1/4] printk: Introduce per-console loglevel setting
Date: Tue, 12 Mar 2019 21:00:07 +0000 [thread overview]
Message-ID: <20190312210004.GC5982@Haydn> (raw)
In-Reply-To: <20190308031032.GA30056@jagdpanzerIV>
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
next prev parent reply other threads:[~2019-03-12 21:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-02 0:48 [RFC][PATCH 0/4] Per-console loglevel support, console device bus Calvin Owens
2019-03-02 0:48 ` [PATCH 1/4] printk: Introduce per-console loglevel setting Calvin Owens
2019-03-08 3:10 ` Sergey Senozhatsky
2019-03-12 21:00 ` Calvin Owens [this message]
2019-03-08 15:09 ` Petr Mladek
2019-03-14 14:12 ` Tetsuo Handa
2019-03-20 15:37 ` Petr Mladek
2019-03-02 0:48 ` [PATCH 2/4] printk: Add ability to set loglevel via "console=" cmdline Calvin Owens
2019-03-08 15:44 ` Petr Mladek
2019-03-02 0:48 ` [PATCH 3/4] printk: Add consoles to a virtual "console" bus Calvin Owens
2019-03-08 2:56 ` John Ogness
2019-03-08 15:58 ` Petr Mladek
2019-03-08 16:34 ` Greg Kroah-Hartman
2019-03-12 20:44 ` Calvin Owens
2019-03-08 15:53 ` Petr Mladek
2019-03-12 20:52 ` Calvin Owens
2019-03-11 13:33 ` Petr Mladek
2019-03-12 21:52 ` Calvin Owens
2019-03-13 10:08 ` Petr Mladek
2019-03-02 0:48 ` [PATCH 4/4] printk: Add a device attribute for the per-console loglevel Calvin Owens
2019-03-04 8:06 ` Sergey Senozhatsky
2019-03-04 19:10 ` Calvin Owens
2019-03-08 3:11 ` Sergey Senozhatsky
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=20190312210004.GC5982@Haydn \
--to=calvinowens@fb.com \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).