From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Hurley <peter@hurleysoftware.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] printk: always report lost messages on serial console
Date: Fri, 13 Jan 2017 14:11:12 +0900 [thread overview]
Message-ID: <20170113051112.GF9360@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <20170111165038.GK20785@pathway.suse.cz>
Hi,
On (01/11/17 17:50), Petr Mladek wrote:
> Hi Sergey,
>
> first, thanks a lot for the detailed description. I have finally
> understood what was important on the "non-important" messages
> and how you used them. I am sorry that I was not able to get
> it earlier.
sure, no prob. I was mostly offline for the past few days for personal
reasons but now I'm back.
[..]
> > now, if the loss of messages was caused by:
> >
> > a) flood of suppressed loglevel messages
> > then printing at least some of those messages makes *a lot* of sense.
> >
> > b) flood of visible loglevel messages
> > then may be those messages are not so important. there a whole logbuf of
> > them. per my experience, it is quite hard to overflow the logbuf with
> > really important, unique, sensible messages of 'visible' loglevel with
> > active loglevel filtering.
>
> Just for record, I guess that the same is true also for the messages
> with lower level. I mean that they are repeating as well.
right. those are 100% reproducible, quick to spot and easy to fix, I
guess. a spontaneous explosion is a different/bigger problem. though
the end result is the same -- we lose messages, may be very important
ones. our best effort/goal is to print logbuf content. that's why we
are playing with nmi/safe printk; zap locks; ignore locks state in
some cases; and so on and on. but when we lose messages that were
meant to be printed even _before_ we try to print them out, then our
best effort is sort of void/undefined.
> It would be great to make it easier to throttle the same messages or
> do it a generic way. But this a food for the future work.
yes. syslog tracks "duplicate messages". but I kinda couldn't understand
how helpful it will be in vprintk_emit() /* because it's too late to track
duplicates in console_unlock(). duplicates should not be stored in multiple
instances in the first place */. backtraces are hard to suppress, besides we
shouldn't suppress backtraces I think. log_store() would have to strcmp() or
"hash+compare hashes" current message and the most recent logbuf message.
but bigger concern is -- do people see dropped messages that often to add
duplicate messages tracker to vprintk_emit()? I see dropped messages quite
a lot, but that's just my setup.
> #define KERN_EMERG KERN_SOH "0" /* system is unusable */
> #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
> #define KERN_CRIT KERN_SOH "2" /* critical conditions */
> #define KERN_ERR KERN_SOH "3" /* error conditions */
>
> The flood of messages usually means something pretty wrong. But
> it might also be caused by too many or forgotten debug messages.
well. it's still really a lot of forgotten messages. so much that
we have to drop other messages. so I'd say the root cause is less
important (if important at all) as long as the result is "lost messages".
> It think that lost messages belong to the level "2". Note that
> the warning about lost NMI messages and recent printk recursion
> were printed with loglevel '2' as well.
>
> Would it make sense and be acceptable to ignore the log level
> only when console_level allows to show KERN_CRIT messages?
need to think. what will it improve?
// I'm catching up with the emails, it'll take some time.
-ss
prev parent reply other threads:[~2017-01-13 5:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-24 14:09 [PATCH 0/2] printk: always report dropped messages Sergey Senozhatsky
2016-12-24 14:09 ` [PATCH 1/2] printk: drop call_console_drivers() unused param Sergey Senozhatsky
2017-01-03 10:22 ` Petr Mladek
2017-01-09 13:49 ` Petr Mladek
2016-12-24 14:09 ` [PATCH 2/2] printk: always report lost messages on serial console Sergey Senozhatsky
2017-01-03 14:55 ` Petr Mladek
2017-01-03 15:47 ` Sergey Senozhatsky
2017-01-03 16:53 ` Petr Mladek
2017-01-04 2:46 ` Sergey Senozhatsky
2017-01-04 10:52 ` Petr Mladek
2017-01-04 13:34 ` Sergey Senozhatsky
2017-01-04 15:26 ` Petr Mladek
2017-01-05 2:30 ` Sergey Senozhatsky
2017-01-05 10:53 ` Petr Mladek
2017-01-09 16:56 ` Petr Mladek
2017-01-10 8:49 ` Sergey Senozhatsky
2017-01-11 16:50 ` Petr Mladek
2017-01-13 5:11 ` Sergey Senozhatsky [this message]
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=20170113051112.GF9360@jagdpanzerIV.localdomain \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--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
all inboxes | Powered by JetHome®