From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752273AbcDVMOm (ORCPT ); Fri, 22 Apr 2016 08:14:42 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:32792 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751911AbcDVMOk (ORCPT ); Fri, 22 Apr 2016 08:14:40 -0400 Date: Fri, 22 Apr 2016 22:12:18 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Pan Xinhui , Sergey Senozhatsky , Andrew Morton , Jan Kara , Tejun Heo , Tetsuo Handa , linux-kernel@vger.kernel.org, Byungchul Park Subject: Re: [PATCH v11 3/3] printk: make printk.synchronous param rw Message-ID: <20160422131218.GA551@swordfish> References: <1460050307-3718-1-git-send-email-sergey.senozhatsky@gmail.com> <1460050307-3718-4-git-send-email-sergey.senozhatsky@gmail.com> <57072DE7.50806@linux.vnet.ibm.com> <20160408052927.GA614@swordfish> <20160421110715.GA2749@pathway.suse.cz> <20160422012826.GA515@swordfish> <20160422084106.GC2749@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160422084106.GC2749@pathway.suse.cz> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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