From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754830AbaJGReP (ORCPT ); Tue, 7 Oct 2014 13:34:15 -0400 Received: from mail-vc0-f172.google.com ([209.85.220.172]:53633 "EHLO mail-vc0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754706AbaJGReK (ORCPT ); Tue, 7 Oct 2014 13:34:10 -0400 Date: Tue, 7 Oct 2014 13:34:04 -0400 From: Tejun Heo To: "Luis R. Rodriguez" Cc: "Luis R. Rodriguez" , gregkh@linuxfoundation.org, dmitry.torokhov@gmail.com, tiwai@suse.de, arjan@linux.intel.com, teg@jklm.no, rmilasan@suse.com, werner@suse.com, oleg@redhat.com, hare@suse.com, bpoirier@suse.de, santosh@chelsio.com, pmladek@suse.cz, dbueso@suse.com, linux-kernel@vger.kernel.org, Tetsuo Handa , Joseph Salisbury , Kay Sievers , One Thousand Gnomes , Tim Gardner , Pierre Fersing , Andrew Morton , Nagalakshmi Nandigama , Praveen Krishnamoorthy , Sreekanth Reddy , Abhijit Mahajan , Casey Leedom , Hariprasad S , MPT-FusionLinux.pdl@avagotech.com, linux-scsi@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v2 7/7] driver-core: add preferred async probe option for built-in and modules Message-ID: <20141007173404.GB31328@mtj.dyndns.org> References: <1412372683-2003-1-git-send-email-mcgrof@do-not-panic.com> <1412372683-2003-8-git-send-email-mcgrof@do-not-panic.com> <20141006201926.GF18303@htj.dyndns.org> <20141006203627.GZ14081@wotan.suse.de> <20141006210118.GG18303@htj.dyndns.org> <20141006231046.GD14081@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141006231046.GD14081@wotan.suse.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Tue, Oct 07, 2014 at 01:10:46AM +0200, Luis R. Rodriguez wrote: > On Mon, Oct 06, 2014 at 05:01:18PM -0400, Tejun Heo wrote: > > For in-kernel stuff, we already have a clear > > synchronization point where we already synchronize all async calls. > > Shouldn't we be flushing these async probes there too? > > This seems to be addressing if what I meant by prepared, "ready", so let > me address this as I do think its important. > > By async calls do you mean users of async_schedule()? I see it Yes. > also uses system_unbound_wq as well but I do not see anyone calling > flush_workqueue(system_unbound_wq) on the kernel. We do use > async_synchronize_full() on kernel_init() but that just waits. But you can create a new workqueue and queue all the async probing work items there and flush the workqueue right after async_synchronize_full(). ... > bus.enable_kern_async=1 would still also serve as a helper for the driver core > to figure out if it should use async probe then on modules if prefer_async_probe > was enabled. Let me know if you figure out a way to avoid it. Why do we need the choice at all? It always should, no? Thanks. -- tejun