Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D42AC37124 for ; Tue, 22 Jan 2019 01:39:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0FD8A2085A for ; Tue, 22 Jan 2019 01:39:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726601AbfAVBjm (ORCPT ); Mon, 21 Jan 2019 20:39:42 -0500 Received: from mga05.intel.com ([192.55.52.43]:20651 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725896AbfAVBjm (ORCPT ); Mon, 21 Jan 2019 20:39:42 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2019 17:39:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,504,1539673200"; d="scan'208";a="293302471" Received: from shbuild888.sh.intel.com (HELO localhost) ([10.239.147.114]) by orsmga005.jf.intel.com with ESMTP; 21 Jan 2019 17:39:39 -0800 Date: Tue, 22 Jan 2019 09:40:29 +0800 From: Feng Tang To: Alexander Duyck Cc: Jeff Kirsher , "David S . Miller" , intel-wired-lan , Netdev Subject: Re: [Intel-wired-lan] [PATCH] igb: Make driver init async Message-ID: <20190122014029.wrqvt3hfl3ee7g2x@shbuild888> References: <1548059825-78171-1-git-send-email-feng.tang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Duyck, Thanks for your review! On Mon, Jan 21, 2019 at 02:50:08PM -0800, Alexander Duyck wrote: > On Mon, Jan 21, 2019 at 12:36 AM Feng Tang wrote: > > > > When optimizing boot time for a platform with igb module, we found the > > igb driver probe will take about 45 ms, make the probe asynchronous > > will save quite some time as the init runs in parallel with other > > asynchronous drivers. > > > > In theory, this could be applied to some other drivers like igc or > > e1000, but we don't have HW to verify that. > > > > Signed-off-by: Feng Tang > > I really don't like this patch. This seems like you are tuning for a > specific platform or system setup by making changes to the driver. Is > there any reason why you couldn't just pass the module parameter > "igb.async_probe" to accomplish the same thing? Thanks for the info. I didn't make it clear, in some case we need it to be builtin, and this doesn't work per my try. > I suspect most people > won't care that much about the 45ms boot time difference, and if we Yes, 45ms is trivial to Desktop/Server. But our platform is for automotive and IOTG case, and these count there. US Department of Transportation has a requirement that the rear-view camera needs to be functional in 2 seconds after power on. To achieve that, we've done things to get 20ms from PCI init, 5ms from disabling some ACPI_PM clocksource :) > were to make this sort of change it should probably be more > generically applied to either PCI devices or network devices instead > of doing this one driver at a time. Agree. I also mentioned this in commit log, I didn't do it for other drivers as I don't have HW to verify, and I would be happy to proceed if experts for those HW think this change is fine. Technically I think it's fine, as making them async will only push their init later, which won't break their existing dependence. And there should be very few modules which depend on network drivers. Thanks, Feng > > > --- > > drivers/net/ethernet/intel/igb/igb_main.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > > index 7137e7f..d477253 100644 > > --- a/drivers/net/ethernet/intel/igb/igb_main.c > > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > > @@ -229,6 +229,7 @@ static struct pci_driver igb_driver = { > > .id_table = igb_pci_tbl, > > .probe = igb_probe, > > .remove = igb_remove, > > + .driver.probe_type = PROBE_PREFER_ASYNCHRONOUS, > > #ifdef CONFIG_PM > > .driver.pm = &igb_pm_ops, > > #endif > > -- > > 2.7.4 > > > > _______________________________________________ > > Intel-wired-lan mailing list > > Intel-wired-lan@osuosl.org > > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan