mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: tom.leiming@gmail.com
Cc: linux-kernel@vger.kernel.org, kay.sievers@vrfy.org,
	akpm@linux-foundation.org
Subject: Re: [PATCH 2/2] init/do_mounts.c: replace polling for root device with devtmpfs_wait_for_dev v1
Date: Fri, 9 Oct 2009 10:30:40 -0700	[thread overview]
Message-ID: <20091009173040.GA5718@kroah.com> (raw)
In-Reply-To: <1249551642-13182-1-git-send-email-tom.leiming@gmail.com>

On Thu, Aug 06, 2009 at 05:40:42PM +0800, tom.leiming@gmail.com wrote:
> From: Ming Lei <tom.leiming@gmail.com>
> 
> This patch removes the polling for root device if rootwait parameter is
> passed to kernel and CONFIG_DEVTMPFS is enabled. This way can lead to
> a faster boot, especially booting from some asynchronous block device
> (such as usb mass storage, mmc card, ...)
> 
> The patch has been verified in beagle board(mmc card as root device).
> 
> Signed-off-by: Ming Lei <tom.leiming@gmail.com>
> ---
>  init/do_mounts.c |   16 ++++++++++++++++
>  1 files changed, 16 insertions(+), 0 deletions(-)
> 
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index aa56007..46f0248 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -364,6 +364,7 @@ void __init mount_root(void)
>  void __init prepare_namespace(void)
>  {
>  	int is_floppy;
> +	int ret;
>  
>  	if (root_delay) {
>  		printk(KERN_INFO "Waiting %dsec before mounting root device...\n",
> @@ -371,6 +372,7 @@ void __init prepare_namespace(void)
>  		ssleep(root_delay);
>  	}
>  
> +#ifndef CONFIG_DEVTMPFS
>  	/*
>  	 * wait for the known devices to complete their probing
>  	 *
> @@ -379,6 +381,7 @@ void __init prepare_namespace(void)
>  	 * for the touchpad of a laptop to initialize.
>  	 */
>  	wait_for_device_probe();
> +#endif

Any way to do this without the #ifdef mess in the file?  That's pretty
ugly, and hard to maintain.

thanks,

greg k-h

      reply	other threads:[~2009-10-09 18:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06  9:40 tom.leiming
2009-10-09 17:30 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091009173040.GA5718@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@linux-foundation.org \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tom.leiming@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®