From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Yanovich Subject: Re: [PATCH v2] wait while adding MMC host to ensure root mounts Date: Tue, 02 Apr 2013 22:56:38 +0400 Message-ID: <1364928998.3399.34.camel@host5.opentask.org> References: <1363223183-3772-1-git-send-email-ynvich@gmail.com> <1363224194-7366-1-git-send-email-ynvich@gmail.com> <87620jmkoe.fsf@octavius.laptop.org> <1364898904.2556.26.camel@host5.opentask.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-bk0-f43.google.com ([209.85.214.43]:33165 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754155Ab3DBS4n (ORCPT ); Tue, 2 Apr 2013 14:56:43 -0400 In-Reply-To: Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Ulf Hansson Cc: Chris Ball , Greg Kroah-Hartman , Linus Walleij , Jaehoon Chung , Namjae Jeon , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org On Tue, 2013-04-02 at 19:45 +0200, Ulf Hansson wrote: > On 2 April 2013 12:35, Sergey Yanovich wrote: > > If the system is booted using initrd and root is not on an mmc card, > > then mmc modules can be omitted from initrd. The probing will happen > > only after root is mounted. > > This will not solve the problem when having one device intended for > rootfs and some other for something else. Of course, as long as the > devices uses the same mmc module. Once inserted, all devices will be > probed. I agree that is this special case there will be boot time regression. However, this case is not guaranteed to boot without the patch or some workaround. > > If root is on an mmc, kernel needs to wait for the mmc probe. > > > > True, although your patch is preventing the parallelism and instead > doing things in synchronized manner. mount_root() assumes it has waited for "known devices to complete their probing" [init/do_mounts.c:545]. The patch has brought mmc into compliance with the assumption. If several devices can be probed in parallel, the bus should do it, but not the driver. > I think we must discuss alternative solutions instead. > > Like an "mmc detect flush" mechanism or a "new card device notification" event. There are 2 events to trigger root mount: 1. all known devices complete their probing 2. 1 is true and root_wait is specified and root device is found So I see the only fast alternative to my patch: if root is on an mmc card, set root_wait to 'true'.