public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus@drzeus.cx>
To: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MMC: Flush mmc workqueue late in the boot sequence
Date: Thu, 10 May 2007 17:58:27 +0200	[thread overview]
Message-ID: <46434123.8040801@drzeus.cx> (raw)
In-Reply-To: <20070510163348.0a117d92@dhcp-252-105.norway.atmel.com>

[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]

Haavard Skinnemoen wrote:
> 
> Ok, is there any better way to achieve the same this? As far as I
> can tell, mmc_remove_host() uses mmc_flush_scheduled_work() for the
> same purpose -- it ensures that scans that have already been started
> will have completed before the function continues.
> 

Not quite. mmc_remove_host() doesn't care if a detect has been executed or not,
it only cares about whether or not one is executing right now. So in order for
your patch to work, there must be no way that mmc_finish_detect() is called
before the detect is scheduled.

> 
> I wouldn't call it luck. The way mmc_rescan() is implemented, any scans
> that are started before late_initcall time are completed before
> mmc_finish_detect() returns. The steps are all done synchronously in
> the workqueue function.
> 

Indeed. But it is not by design that they are scheduled before late_initcall().
Also, flushing the workqueue is also not a by-design way of completing a scan,
it just happens to be that way right now.

> And I never realized that using a block device as a parameter to the
> root= parameter could possibly be "unofficial" functionality...?

Then you've learned something new. ;)

Only some devices work that way (generally only those with "simple" interfaces).
And most things are these days behind more advanced buses, more akin to a network.

Generally, not waiting for a lot of hardware is a good thing as it speeds up
boot times. In my mind, the proper way is having a script in an initrd that
waits for just the parts of the hardware that this particular system needs.
Everything else can be brought up in the background.

Rgds
Pierre



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

  reply	other threads:[~2007-05-10 15:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10 10:35 [PATCH] MMC: Flush mmc workqueue late in the boot sequence Haavard Skinnemoen
2007-05-10 12:04 ` Pierre Ossman
2007-05-10 12:37   ` Haavard Skinnemoen
2007-05-10 13:45     ` Pierre Ossman
2007-05-10 14:33       ` Haavard Skinnemoen
2007-05-10 15:58         ` Pierre Ossman [this message]
2007-05-10 16:27           ` Haavard Skinnemoen
2007-05-10 17:51             ` Matt Reimer
2007-05-11  7:44               ` Haavard Skinnemoen
2007-05-10 19:41             ` Pierre Ossman
2007-05-11  8:39               ` Haavard Skinnemoen
2007-05-13 13:34                 ` Pierre Ossman
2007-05-13 13:47                   ` Haavard Skinnemoen
2007-05-13 14:24                     ` Pierre Ossman
2007-05-13 14:37                       ` Haavard Skinnemoen

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=46434123.8040801@drzeus.cx \
    --to=drzeus@drzeus.cx \
    --cc=hskinnemoen@atmel.com \
    --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