Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: NamJae Jeon <linkinjeon@gmail.com>, linux-mmc@vger.kernel.org
Subject: Re: About mmc delayed workqueue.
Date: Tue, 29 Mar 2011 22:17:11 -0400	[thread overview]
Message-ID: <m3k4fh8i8o.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <AANLkTi=5R9w0k_Hg=htyDc=aQDA+t1HOLvWtfAOvMo+z@mail.gmail.com> (NamJae Jeon's message of "Wed, 30 Mar 2011 09:26:53 +0900")

Hi,

On Tue, Mar 29 2011, NamJae Jeon wrote:
> Dear. Chris, Ben.
>
> Thanks for your reply.
>
> As you know, booting time is important factor in embededd device.
>
> If rootdelay is set to 5, kernel will be waiting for 5 sec. root_wait
> is also looping per 100ms.

No.  It will wait for *up to* five seconds, but it will actually
continue as soon as the device has enumerated.  Same with rootwait,
of course.

MMC is by no means the only subsystem that behaves this way.  If you
were using a USB or SATA/AHCI device, amongst many others, you would
have exactly the same problem.

You can see http://lwn.net/Articles/330378/ for some background reading.

> I have a question. Why is  mmc using delayed workqueue ?

So that device enumeration can happen in the background, without
delaying the kernel boot while we wait for the controller to get all
the way to creating partitions.

If we didn't use a workqueue and you were working on an embedded project
that had an MMC slot that it *didn't* boot from, you'd be yelling at us
for instead wasting time holding up your non-mmc boot by not letting
userspace get going until we list MMC partitions.  We can't win.  :-)

In any case, I suspect that your system actually does boot faster than
it would if we didn't use a workqueue -- this way the delays in waiting
for the controller to come up are parallelized with other boot code.
That's good, right?

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  parent reply	other threads:[~2011-03-30  2:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 23:33 About mmc delayed workqueue NamJae Jeon
2011-03-29 23:34 ` Ben Dooks
2011-03-29 23:44   ` Chris Ball
     [not found]     ` <AANLkTi=5R9w0k_Hg=htyDc=aQDA+t1HOLvWtfAOvMo+z@mail.gmail.com>
2011-03-30  0:40       ` NamJae Jeon
2011-03-30  2:17       ` Chris Ball [this message]
2011-03-30  5:10         ` NamJae Jeon

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=m3k4fh8i8o.fsf@pullcord.laptop.org \
    --to=cjb@laptop.org \
    --cc=linkinjeon@gmail.com \
    --cc=linux-mmc@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