From: Jan Kara <jack@suse.cz>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.com>, Petr Mladek <pmladek@suse.com>,
Tejun Heo <tj@kernel.org>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
linux-kernel@vger.kernel.org,
Byungchul Park <byungchul.park@lge.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH v12 3/3] printk: make printk.synchronous param rw
Date: Sat, 23 Apr 2016 08:56:33 +0200 [thread overview]
Message-ID: <20160423065633.GA6771@quack2.suse.cz> (raw)
In-Reply-To: <1461333180-2897-4-git-send-email-sergey.senozhatsky@gmail.com>
On Fri 22-04-16 22:53:00, Sergey Senozhatsky wrote:
> Change `synchronous' printk param to be RW, so user space
> can change printk mode back and forth to/from sync mode
> (which is considered to be more reliable).
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
The patch looks good to me. One suggestion below:
> @@ -1785,7 +1782,7 @@ asmlinkage int vprintk_emit(int facility, int level,
> * operate in sync mode once panic() occurred.
> */
> if (console_loglevel != CONSOLE_LOGLEVEL_MOTORMOUTH &&
> - printk_kthread) {
> + !printk_sync && printk_kthread) {
> /* Offload printing to a schedulable context. */
> printk_kthread_need_flush_console = true;
> wake_up_process(printk_kthread);
It would seem more future-proof to hide '!printk_sync && printk_kthread'
into a wrapper function as it is somewhat subtle detail that printk_kthread
needn't exist while !printk_sync and I can imagine someone forgetting to
check that in the future. Something like 'can_print_async()'? But I don't
feel too strongly about that so feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
regardless whether you change this or not.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2016-04-23 6:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 13:52 [PATCH v12 0/3] printk: Make printk() completely async Sergey Senozhatsky
2016-04-22 13:52 ` [PATCH v12 1/3] " Sergey Senozhatsky
2016-04-26 14:13 ` Petr Mladek
2016-04-22 13:52 ` [PATCH v12 2/3] printk: Make wake_up_klogd_work_func() async Sergey Senozhatsky
2016-04-22 13:53 ` [PATCH v12 3/3] printk: make printk.synchronous param rw Sergey Senozhatsky
2016-04-23 6:56 ` Jan Kara [this message]
2016-04-23 8:26 ` Sergey Senozhatsky
2016-04-23 15:01 ` [PATCH] " Sergey Senozhatsky
2016-04-26 14:15 ` Petr Mladek
2016-04-27 1:09 ` Sergey Senozhatsky
-- strict thread matches above, loose matches on Subject: below --
2016-05-13 13:18 [PATCH v12 0/3] printk: Make printk() completely async Sergey Senozhatsky
2016-05-13 13:18 ` [PATCH v12 3/3] printk: make printk.synchronous param rw 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=20160423065633.GA6771@quack2.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=byungchul.park@lge.com \
--cc=jack@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=pmladek@suse.com \
--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