From: Arjan van de Ven <arjan@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, fweisbec@gmail.com,
linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
linux-acpi@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH 0/4] Fastboot revisited: Asynchronous function calls
Date: Sun, 4 Jan 2009 11:48:52 -0800 [thread overview]
Message-ID: <20090104114852.2cfee4d3@infradead.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0901041118390.3179@localhost.localdomain>
On Sun, 4 Jan 2009 11:27:08 -0800 (PST)
Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>
> On Sun, 4 Jan 2009, Linus Torvalds wrote:
> >
> > Ok, so why does the serial port init take so long? That's a quarter
> > of a second for you, which is ridiculous.
>
> Hmm. I also note that you don't seem to have the IDE probing
> configured in at all. It's not _that_ uncommon, afaik, and even if
> you have no devices behind it (or perhaps _especially_ if you have no
> devices behind it), the IDE probe is actually pretty expensive. Hmm?
actually pretty much all PC distros no longer ship with CONFIG_IDE,
only libata.
And afaik the box that that bootchart came from only has SATA devices
and the bios is also configured as such.. so not even libata sees IDE
devices.
> Also, I'm looking at the AHCI vs Marvell thing, and the problem seems
> to be that you do that libata port scan like this:
>
> for (i = 0; i < host->n_ports; i++) {
> struct ata_port *ap = host->ports[i];
>
> async_schedule(async_port_probe, ap);
> }
>
> async_synchronize_full();
> /* probes are done, now scan each port's disk(s) */
> DPRINTK("host probe begin\n");
> for (i = 0; i < host->n_ports; i++) {
> struct ata_port *ap = host->ports[i];
>
> ata_scsi_scan_host(ap, 1);
> }
>
> which means that there is a full serialization between each
> controller.
yeah in the current patch that is exactly the case.
I don't know the libata code enough to know if it's safe to do
otherwise. The code was structured such that it looked VERY deliberate
to do these two things in separate steps.
> Wouldn't is be possible to move the "ata_scsi_scan_host(ap, 1);"
> _into_ the async_port_probe(), and just do a
>
> async_synchronize_cookie(cookie);
>
> before it? Hmm?
I would think so but someone from the libata/scsi world needs to say
so.. I didn't want to break the world entirely yet.
> And then not do any async_synchronize_full() at all, until much
> later. For example, we clearly do need that full synchronization
> before we try to mount the root filesystem, but we should have that
actually we should try to mount, and if we fail, then synchronize, and
try again.
I need that capability for something else anyway
(and have a patch to do this in general, I just need to dust it off and
see if it's still any good)
[in case you're curious: if you boot without initrd, and have a
touchpad, right now the kernel will wait for the touchpad probing to be
done explicitly before trying to mount the rootfs; on many laptops that
I have access to that touchpad probing can easily take 7 seconds. The
patch I have gets rid of that delay by just trying, for most cases
it'll just be there anyway]
> particular synchronization regardless of any SATA issues.
yeah likewise before freeing initmem... pretty much the same reason.
I'm not worried about that too much; at some point you just have to
serialize. no big deal.
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
next prev parent reply other threads:[~2009-01-04 19:47 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-04 17:24 [PATCH 0/4] Fastboot revisited: Asynchronous function calls Arjan van de Ven
2009-01-04 17:28 ` [PATCH 1/4] fastboot: Asynchronous function calls to speed up kernel boot Arjan van de Ven
2009-01-04 18:33 ` Linus Torvalds
2009-01-04 18:40 ` Arjan van de Ven
2009-01-04 18:49 ` Arjan van de Ven
2009-01-04 19:05 ` Andi Kleen
2009-01-04 19:09 ` Arjan van de Ven
2009-01-04 19:49 ` Andi Kleen
2009-01-04 19:52 ` Andrew Morton
2009-01-04 17:29 ` [PATCH 2/4] fastboot: make scsi probes asynchronous Arjan van de Ven
2009-01-04 18:05 ` Matthew Wilcox
2009-01-04 18:13 ` Arjan van de Ven
2009-01-04 18:38 ` Jaswinder Singh Rajput
2009-01-04 18:44 ` Arjan van de Ven
2009-01-04 17:30 ` [PATCH 3/4] fastboot: make the libata port scan asynchronous Arjan van de Ven
2009-01-04 17:31 ` [PATCH 4/4] fastboot: make ACPI bus drivers probe asynchronous Arjan van de Ven
2009-01-05 2:03 ` Zhao Yakui
2009-01-05 1:58 ` Arjan van de Ven
2009-01-05 2:51 ` Zhao Yakui
2009-01-05 2:51 ` Arjan van de Ven
2009-01-05 5:30 ` Zhao Yakui
2009-01-04 18:16 ` [PATCH 0/4] Fastboot revisited: Asynchronous function calls Linus Torvalds
2009-01-04 18:31 ` Arjan van de Ven
2009-01-04 18:54 ` Linus Torvalds
2009-01-04 19:05 ` Arjan van de Ven
2009-01-04 19:11 ` Linus Torvalds
2009-01-04 19:19 ` Arjan van de Ven
2009-01-05 16:21 ` Alan Cox
2009-01-05 21:13 ` Arjan van de Ven
2009-01-05 21:21 ` Linus Torvalds
2009-01-04 19:11 ` Andi Kleen
2009-01-04 19:46 ` Robert Hancock
2009-01-04 19:27 ` Linus Torvalds
2009-01-04 19:48 ` Arjan van de Ven [this message]
2009-01-04 21:44 ` Alan Cox
2009-01-11 13:14 ` Pavel Machek
2009-01-05 6:01 ` Nigel Cunningham
2009-01-05 8:47 ` Frederic Weisbecker
2009-01-05 10:53 ` Arjan van de Ven
2009-01-05 11:18 ` Nigel Cunningham
2009-01-07 2:41 ` Shaohua Li
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=20090104114852.2cfee4d3@infradead.org \
--to=arjan@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).