mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: tom.leiming@gmail.com
Cc: kay.sievers@vrfy.org, greg@kroah.com, cornelia.huck@de.ibm.com,
	linux-kernel@vger.kernel.org, Ming Lei <tom.leiming@gmail.com>
Subject: Re: [PATCH] [PATCH/RESEND] driver core: remove polling for driver_probe_done(v4)
Date: Fri, 20 Feb 2009 07:33:45 -0800	[thread overview]
Message-ID: <20090220073345.501247f7@infradead.org> (raw)
In-Reply-To: <1235139447-5829-1-git-send-email-tom.leiming@gmail.com>

On Fri, 20 Feb 2009 22:17:27 +0800
tom.leiming@gmail.com wrote:

> From: Ming Lei <tom.leiming@gmail.com>
> 
> This patch adds a function : driver_wait_probe_done,
> which waits on condition of probing done to replace
> polling for driver_probe_done in fs initialization.
> 
> There is no better way to avoid polling for
> driver_probe_done _and_ existence of the root device,
> so we does not replace the driver_probe_done with
> driver_wait_probe_done in such special case.
> 
> Removing polling in fs initialization may lead to
> a faster boot.
> 
> This patch is against the latest linux-next tree.

you broke it i this revision though

> -int wait_for_device_probe(void)
> +void driver_wait_probe_done(void)
>  {
> -	/* wait for the known devices to complete their probing */
> -	while (driver_probe_done() != 0)
> -		msleep(100);
> -	async_synchronize_full();
> -	return 0;
> +	pr_debug("%s: probe_count = %d\n", __func__,
> +		 atomic_read(&probe_count));
> +	wait_event(probe_waitqueue, atomic_read(&probe_count) == 0);


You lost the async_synchronize_full()!


> -	wait_for_device_probe();
> +	driver_wait_probe_done();

I also don't understand why you rename the function..
wait_for_device_probe() is not a bad name ;)
Sounds like a gratuitous change to me.


-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

  reply	other threads:[~2009-02-20 15:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 14:17 tom.leiming
2009-02-20 15:33 ` Arjan van de Ven [this message]
2009-02-21  1:28   ` Ming Lei
2009-02-21  4:29     ` Arjan van de Ven
2009-02-21  8:21       ` Ming Lei

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=20090220073345.501247f7@infradead.org \
    --to=arjan@infradead.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=greg@kroah.com \
    --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®