From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] printk: Introduce "store now but print later" prefix.
Date: Wed, 6 Mar 2019 23:27:41 +0900 [thread overview]
Message-ID: <20190306142741.GA21163@tigerII.localdomain> (raw)
In-Reply-To: <20190306100404.jzfk7oqsh3turqth@pathway.suse.cz>
On (03/06/19 11:04), Petr Mladek wrote:
> > I'm suggesting to use a non-async printk() for $trailer_text_line line. I think
> > that changing all printk() called from out_of_memory() to async is doable, if
> > the caller of out_of_memory() wakes up a dedicated kthread described below.
>
> This is error prone. The trailing printk is not guaranteed:
>
> + It might get lost by code refactoring.
>
> + People would miss that it is needed when async printk is used
> in a shared function, e.g. dump_stack().
>
> + People will not know that it is needed because they
> are not familiar with the API. The would just use it
> as part of a cargo cult programming or so.
>
> For this reason, this API is a "no no no" from my side.
Conceptually, this buffering is just pr_cont() with extension
from "1 line" to "N lines". pr_cont() also waits for a special
marker to flush the buffered data - that marker is pr_cont('\n'),
which forces printk to log_store() cont buffer. In Tetsuo's
proposal the marker is different. That's the only difference I
see. Should any other CPU printk() anything - it will print out
buffered data, same thing as pr_cont(), again.
-ss
next prev parent reply other threads:[~2019-03-06 14:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-23 4:42 [RFC PATCH] printk: Introduce "store now but print later" prefix Tetsuo Handa
2019-03-04 3:22 ` Sergey Senozhatsky
2019-03-04 11:40 ` Tetsuo Handa
2019-03-04 12:09 ` Sergey Senozhatsky
2019-03-04 14:23 ` Petr Mladek
2019-03-04 14:37 ` Sergey Senozhatsky
2019-03-05 1:23 ` Tetsuo Handa
2019-03-05 7:52 ` Sergey Senozhatsky
2019-03-05 12:57 ` Michal Hocko
2019-03-06 10:04 ` Petr Mladek
2019-03-06 14:27 ` Sergey Senozhatsky [this message]
2019-03-06 18:24 ` Tetsuo Handa
2019-03-15 10:49 ` Tetsuo Handa
2019-03-20 15:04 ` Petr Mladek
2019-03-20 15:25 ` ratelimit API: was: " Petr Mladek
2019-03-21 8:13 ` Tetsuo Handa
2019-03-21 8:49 ` Michal Hocko
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=20190306142741.GA21163@tigerII.localdomain \
--to=sergey.senozhatsky@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=torvalds@linux-foundation.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).