Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761682Ab3DBS4p (ORCPT ); Tue, 2 Apr 2013 14:56:45 -0400 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 Message-ID: <1364928998.3399.34.camel@host5.opentask.org> Subject: Re: [PATCH v2] wait while adding MMC host to ensure root mounts From: Sergey Yanovich 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 Date: Tue, 02 Apr 2013 22:56:38 +0400 In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.2-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1760 Lines: 44 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'. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/