From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
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
Subject: Re: [PATCH 2/2] printk: wake up klogd in vprintk_emit
Date: Thu, 19 Apr 2018 10:23:11 +0900 [thread overview]
Message-ID: <20180419012311.GB2700@jagdpanzerIV> (raw)
In-Reply-To: <20180418140409.6hvkbip4skfs4x7y@pathway.suse.cz>
On (04/18/18 16:04), Petr Mladek wrote:
[..]
> > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> > index 2f4af216bd6e..86f0b337cbf6 100644
> > --- a/kernel/printk/printk.c
> > +++ b/kernel/printk/printk.c
> > @@ -1888,6 +1888,7 @@ asmlinkage int vprintk_emit(int facility, int level,
> >
> > printed_len = log_output(facility, level, lflags, dict, dictlen, text, text_len);
> >
> > + wake_up_klogd();
> > logbuf_unlock_irqrestore(flags);
>
> The change makes perfect sense and I am fine with the idea. I just
> wonder if there is a strong reason to do the wake_up before
> releasing the logbuf_lock. It makes an assumption that it needs
> to be synchronized by logbuf_lock.
No, not really, just wanted to wakeup klogd from the same CPU which
called printk().
> In fact, I would feel more comfortable if we move this to the end
> of vprintk_emit() right before return printk_len. This will be
> more close to the current behavior (console first). But it will
> still wakeup klogd much earlier and regularly if there is
> a flood of messages.
Hm, the idea of the patch is that the existing "push everything to slow
consoles first, then wakeup syslog" is not very robust. But probably we
can do what you suggested, yes.
-ss
next prev parent reply other threads:[~2018-04-19 1:23 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 [this message]
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
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=20180419012311.GB2700@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--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