Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4179540ooa; Tue, 14 Aug 2018 02:13:04 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxTL3zrLZwL8FccBcKHuGBBPgBZh0cLGRC6GXu4t0Bs5rJ6XBAcWYfxMhURM6nLVxqygyku X-Received: by 2002:a17:902:a50e:: with SMTP id s14-v6mr9761008plq.247.1534237984732; Tue, 14 Aug 2018 02:13:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534237984; cv=none; d=google.com; s=arc-20160816; b=yHK1xfIxF9X4+q4vxH45FSNxBAb2/NtwDfjWQSw4TGoHHF3eoM1yFQgI/fX16+x7Dp OshbOsixSi66LQDt2awGpxJVN/Jb3KxtIWKM/fg+HVO6MWzvhFHMOqk0UtaAiH/790ZZ xTGV9h0mgC9FoKFuapbDBNNOtVOAGla52B6teyJr4ucNTwQeaoKnK8z0u9jxWdyBcdEj JfPBI3SV8saAtpjLjDNfhPeVW9oQFsKrH2BhI500yJCLb1gxcY+TcdCiRhbST0h0W4Xf ZFNLxp6j5LhtMYnE0NDCvL9AFmZkBSJp8MDGk0dfG5Zc4tkbPdMr92iSI9/HN5Z4tHTU Uv/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=mZLCl8FhwGs8gAbgI8yytbpYhPIgBOUCw8QG1wFmCVc=; b=WwZLFyDGGGC203QtL6NT83IOeI47dcPKg2uJAN+jruDHbzokK2Hln6Zfccb/ARIwIY 8rssdITYc7De9WV22bAu0Qp9he/pUn9CrcWqU+F9aH2GftvH3jNO4NKrKygP3d5isow6 bDJpyQSJN/bsFZVmLAvs2dW/8r2mlekZGJN5yB9KQuUqYws09NQFWYYbFMcFYQVIZyt8 bLxTBXD2kRJFaoNrpZMV1fWEZ50DBw+7FyKk0syPJa74kJWxuC8oBRJDnVzcCVvwMO1F 86DUKJIoDtswRA3aPfNChYKPGAG2vko5xiXGUlRO80rxJP5FurHer9k3iZLuYlcSnDBD DuaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o10-v6si2385723pls.94.2018.08.14.02.12.49; Tue, 14 Aug 2018 02:13:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730636AbeHNL2z (ORCPT + 99 others); Tue, 14 Aug 2018 07:28:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55848 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727986AbeHNL2z (ORCPT ); Tue, 14 Aug 2018 07:28:55 -0400 Received: from localhost (unknown [194.244.16.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5EEFA9F0; Tue, 14 Aug 2018 08:42:44 +0000 (UTC) Date: Tue, 14 Aug 2018 10:42:41 +0200 From: Greg Kroah-Hartman To: Feng Tang Cc: Ulf Hansson , Linux Kernel Mailing List , "linux-mmc@vger.kernel.org" , Adrian Hunter , arjan@linux.intel.com, Alan Cox Subject: Re: [PATCH] mmc: Move the mmc driver init earlier Message-ID: <20180814084241.GA7208@kroah.com> References: <20180608095154.22413-1-feng.tang@intel.com> <20180612084234.gjzq66xsqblryrkm@shbuild888> <20180802091539.m5k7cdoad6hfkdfy@shbuild888> <20180814063959.45bddz42ytz3e4jb@shbuild888> <20180814071834.GB24616@kroah.com> <20180814073810.m7ewuyvuhptgsm22@shbuild888> <20180814074041.GB28982@kroah.com> <20180814080851.jazg3qebsleklqa5@shbuild888> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180814080851.jazg3qebsleklqa5@shbuild888> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 14, 2018 at 04:08:51PM +0800, Feng Tang wrote: > Hi Greg, > > Thanks for the prompt review. > > On Tue, Aug 14, 2018 at 09:40:41AM +0200, Greg Kroah-Hartman wrote: > > On Tue, Aug 14, 2018 at 03:38:10PM +0800, Feng Tang wrote: > > > Hi Greg, > > > > > > On Tue, Aug 14, 2018 at 09:18:34AM +0200, Greg Kroah-Hartman wrote: > > > > On Tue, Aug 14, 2018 at 02:39:59PM +0800, Feng Tang wrote: > > > > > Hi Greg, Ulf > > > > > > > > > > Could you help to review this? many thanks! > > > > > > > > Review what? I see no patch here. And why would I need to review a mmc > > > > patch in the middle of the merge window? > > > > > > > > totally confused, > > > > > > Sorry for the confusion! I didn't noticed the 4.19 merge window. > > > > > > The patch was originally posted in June, and has gone through some > > > review discussions with mmc maintainers, my last mail was trying > > > to keep some discussion info. > > > > Ok, then why ask me? I'm not the mmc maintainer. > > The reason is this patch not only touches the mmc, but also affects many other > subsystems in drivers/ as the init order is changed. And the get_maintainer.pl > shows you are the first suggested reviewer for changes to drivers/Makefile :) Fair enough, but then I could not make that change without the mmc maintainer agreeing with it. > > > > > > The original patch is: > > > ----- > > > > > > >From 1514c7d56e887ace37466dded09bc43f2a4c9a4a Mon Sep 17 00:00:00 2001 > > > From: Feng Tang > > > Date: Fri, 8 Jun 2018 17:10:30 +0800 > > > Subject: [PATCH] mmc: Move the mmc driver init earlier > > > > > > When doing some boot time optimization for an eMMC rootfs NUCs, > > > we found the rootfs may spend around 100 microseconds waiting > > > for eMMC card to be initialized, then the rootfs could be > > > mounted. > > > [ 1.216561] Waiting for root device /dev/mmcblk1p1... > > > [ 1.289262] mmc1: new HS400 MMC card at address 0001 > > > [ 1.289667] mmcblk1: mmc1:0001 R1J56L 14.7 GiB > > > [ 1.289772] mmcblk1boot0: mmc1:0001 R1J56L partition 1 8.00 MiB > > > [ 1.289869] mmcblk1boot1: mmc1:0001 R1J56L partition 2 8.00 MiB > > > [ 1.289967] mmcblk1rpmb: mmc1:0001 R1J56L partition 3 4.00 MiB > > > [ 1.292798] mmcblk1: p1 p2 p3 > > > [ 1.300576] EXT4-fs (mmcblk1p1): couldn't mount as ext3 due to feature incompatibilities > > > [ 1.300912] EXT4-fs (mmcblk1p1): couldn't mount as ext2 due to feature incompatibilities > > > > > > And this is a common problem for smartphones, tablets, embedded > > > devices and automotive products. This patch will make the eMMC/SD > > > card start initializing earlier, by changing its order in drivers/Makefile. > > > > > > On our platform, the waiting for eMMC card is almost eliminated with the patch, > > > which is critical to boot time. And it should benefit other non-x86 platforms > > > which see the similar waiting for emmc rootfs. > > > > > > Signed-off-by: Feng Tang > > > --- > > > drivers/Makefile | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/Makefile b/drivers/Makefile > > > index 24cd47014657..c473afd3c688 100644 > > > --- a/drivers/Makefile > > > +++ b/drivers/Makefile > > > @@ -50,6 +50,9 @@ obj-$(CONFIG_REGULATOR) += regulator/ > > > # reset controllers early, since gpu drivers might rely on them to initialize > > > obj-$(CONFIG_RESET_CONTROLLER) += reset/ > > > > > > +# put mmc early as many morden devices use emm/sd card as rootfs storage > > > > Spelling error :) > > Will change it. > > > > > > +obj-y += mmc/ > > > + > > > # tty/ comes before char/ so that the VT console is the boot-time > > > # default. > > > obj-y += tty/ > > > > Everyone wants to be first. Watch out if you try to put stuff before > > tty, you have to be very careful. There are sd serial devices, right? > > As the eMMC/SD card initialization takes quite some time, the SDHCI > host controller's module init function will quickly return, while leaving > a worker to do the real card detection/initialization, so other subsystems > should not be blocked. > > And yes, it is safer to move it after tty/ Again, everyone wants to be first, saving 100ms is great, but make sure this will not break anything else. It's a huge change to a long-standing "we know this works" linker order. Personally, I would not want to accept this patch for that reason alone. Also given you ignored the comment for the tty line doesn't make me feel comfortable either. If you really really need this, I would suggest just doing it in your device-specific tree for a few years and when this is the only out-of-tree patch you are carrying, then revisit it :) thanks, greg k-h