From: Ming Lei <tom.leiming@gmail.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: kay.sievers@vrfy.org, greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] driver core: remove polling for driver_probe_done(v2)
Date: Fri, 30 Jan 2009 17:59:04 +0800 [thread overview]
Message-ID: <d82e647a0901300159g79680ed4h778ebb591861578c@mail.gmail.com> (raw)
In-Reply-To: <20090129210435.4ca393c4@infradead.org>
2009/1/30 Arjan van de Ven <arjan@infradead.org>:
> On Fri, 30 Jan 2009 10:31:42 +0800
> tom.leiming@gmail.com wrote:
>
>> From: Ming Lei <tom.leiming@gmail.com>
>>
>> This patch renames driver_probe_done to driver_wait_probe_done,
>> and make it wait on condition of probing done to remove
>> polling for it in fs initialization. Also add
>> driver_wait_probe_done_and_dev_appear(name) to allow callers
>> to wait until all probing is done AND until the device @name
>> exists.
>
>> /**
>> + * driver_wait_probe_done_and_dev_appear
>> + * wait until the probe sequence is finished _and_ the dev @name
>> appears.
>
> Hi,
>
> sorry to be the bad guy, but I think you turned the "either one" into a
> "both".... so this isn't going to work ;(
IMHO, it will msleep if either one is ture, so we turn this into
return( not sleep) if both are false.
( eg, A||B->C <=> ~C->~A&&~B ) :-)
while (driver_probe_done() != 0 ||
(ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
msleep(100);
here:
driver_probe_done() == 0 && name_to_dev_t(saved_root_name)
===>
driver_wait_probe_done_and_dev_appear(name)
{
if (driver_probe_done() == 0 &&
(ROOT_DEV = name_to_dev_t(saved_root_name)))
return;
else
schedule();
}
Thanks!
>
> unless I'm just too tired and miss something subtle, but I am pretty
> sure DeMorgan does not work this way :)
>
>
> --
> Arjan van de Ven Intel Open Source Technology Centre
> For development, discussion and tips for power savings,
> visit http://www.lesswatts.org
>
--
Lei Ming
next prev parent reply other threads:[~2009-01-30 9:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-30 2:31 tom.leiming
2009-01-30 5:04 ` Arjan van de Ven
2009-01-30 9:59 ` Ming Lei [this message]
2009-01-30 10:05 ` Cornelia Huck
2009-01-30 10:17 ` Ming Lei
2009-01-30 10:30 ` Cornelia Huck
2009-01-30 10:51 ` 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=d82e647a0901300159g79680ed4h778ebb591861578c@mail.gmail.com \
--to=tom.leiming@gmail.com \
--cc=arjan@infradead.org \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
/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®