All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Pan Xinhui <xinhui@linux.vnet.ibm.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jan Kara <jack@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>
Subject: Re: [PATCH v11 3/3] printk: make printk.synchronous param rw
Date: Fri, 22 Apr 2016 22:12:18 +0900	[thread overview]
Message-ID: <20160422131218.GA551@swordfish> (raw)
In-Reply-To: <20160422084106.GC2749@pathway.suse.cz>

Hello,

On (04/22/16 10:41), Petr Mladek wrote:
> Ah, I see and feel shame. It is actually explained in the comment
> above printk_initcall_done declaration. Well, the explanation confused
> me a bit ;-) I suggest to change it sligtly:
> 
> /*
>  * printk_sync_set() can be called from two places:
>  *
>  * - early from start_kernel()->parse_args().  But we can't kthread_run()
>  *   at this stage, so we just set the param value.  The actual
>  *   initalization happens later, from the late_initcall().
>  *
>  * - even later from user space via sysfs knob.  We can kthread_run()
>  *   there if needed.
>  */
> 
> Or we could write this even more explicitely:
> 
> /*
>  * Prevent starting kthreads from start_kernel()->parse_args().  It is not
>  * possible at this stage.  Instead do so via the inticall.
>  */
> static bool printk_initcall_done;

will take a look, thanks!

> In each case, I would move the comment and the declaration right above the
> printk_sync_set().

I'm also thinking about renaming it to `printk_kthread_can_run', feels
like this name gives better description.

will resend shortly.

	-ss

  reply	other threads:[~2016-04-22 12:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 17:31 [PATCH v11 0/3] printk: Make printk() completely async Sergey Senozhatsky
2016-04-07 17:31 ` [PATCH v11 1/3] " Sergey Senozhatsky
2016-04-07 17:31 ` [PATCH v11 2/3] printk: Make wake_up_klogd_work_func() async Sergey Senozhatsky
2016-04-07 17:31 ` [PATCH v11 3/3] printk: make printk.synchronous param rw Sergey Senozhatsky
2016-04-08  4:04   ` Pan Xinhui
2016-04-08  5:29     ` Sergey Senozhatsky
2016-04-08  5:44       ` Pan Xinhui
2016-04-21 11:07       ` Petr Mladek
2016-04-22  1:28         ` Sergey Senozhatsky
2016-04-22  8:41           ` Petr Mladek
2016-04-22 13:12             ` Sergey Senozhatsky [this message]
2016-04-20 15:16   ` Jan Kara
2016-04-21  2:03     ` Sergey Senozhatsky
2016-04-16  2:55 ` [PATCH v11 0/3] printk: Make printk() completely async Sergey Senozhatsky
2016-04-16  5:44   ` Joe Perches
2016-04-21  2:14     ` Sergey Senozhatsky
2016-04-21  2:17       ` Joe Perches
2016-04-21 13:19         ` Jan Kara

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=20160422131218.GA551@swordfish \
    --to=sergey.senozhatsky@gmail.com \
    --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=tj@kernel.org \
    --cc=xinhui@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.