From: Petr Mladek <pmladek@suse.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>, Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCHv2] printk: wake up klogd in vprintk_emit
Date: Fri, 20 Apr 2018 10:18:16 +0200 [thread overview]
Message-ID: <20180420081815.5lvob7fuyvlfpriw@pathway.suse.cz> (raw)
In-Reply-To: <20180420015221.GA6397@jagdpanzerIV>
On Fri 2018-04-20 10:52:21, Sergey Senozhatsky wrote:
> On (04/19/18 12:02), Petr Mladek wrote:
> > On Thu 2018-04-19 10:42:50, Sergey Senozhatsky wrote:
> > > We wake up klogd very late - only when current console_sem owner
> > > is done pushing pending kernel messages to the serial/net consoles.
> > > In some cases this results in lost syslog messages, because kernel
> > > log buffer is a circular buffer and if we don't wakeup syslog long
> > > enough there are chances that logbuf simply will wrap around.
> > >
> > > The patch moves the klog wake up call to vprintk_emit(), which is
> > > the only legit way for a kernel message to appear in the logbuf,
> > > right before we attempt to grab the console_sem (possibly spinning
> > > on it waiting for the hand off) and call console drivers.
> >
> > The last two lines need an update. What about?
>
> Ah. Indeed!
>
> > "right after the attempt to handle consoles. As a result, klog
> > will get waken either after flushing the new message to consoles
> > or immediately when consoles are still busy with older messages."
>
> Looks good. Do you want me to resend the patch?
No need to resend. I could update the patch when pushing.
I'll wait few more days to give people time to respond.
Best Regards,
Petr
next prev parent reply other threads:[~2018-04-20 8:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-14 3:01 [PATCH 2/2] printk: wake up klogd in vprintk_emit Sergey Senozhatsky
2018-04-18 14:04 ` Petr Mladek
2018-04-19 1:23 ` Sergey Senozhatsky
2018-04-19 9:54 ` Petr Mladek
2018-04-18 14:29 ` Steven Rostedt
2018-04-18 15:02 ` Petr Mladek
2018-04-18 15:10 ` Steven Rostedt
2018-04-19 1:17 ` Sergey Senozhatsky
2018-04-19 1:42 ` [PATCHv2] " Sergey Senozhatsky
2018-04-19 10:02 ` Petr Mladek
2018-04-20 1:52 ` Sergey Senozhatsky
2018-04-20 8:18 ` Petr Mladek [this message]
2018-04-25 13:23 ` Petr Mladek
2018-04-26 1:44 ` 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=20180420081815.5lvob7fuyvlfpriw@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=tj@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;
as well as URLs for NNTP newsgroup(s).