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:05:59 -0800 [thread overview]
Message-ID: <20090104110559.306186c4@infradead.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0901041038570.3179@localhost.localdomain>
On Sun, 4 Jan 2009 10:54:15 -0800 (PST)
Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> Since it seems to be the irq auto-probing, then doing it
> asynchronously won't help. Not only will it happen only for ports
> that you actually have (rather than the number you have configured),
> but even if you actually have multiple physical ports, the irq
> autoprobing is all serialized (and has to be - it depends on).
>
> It's serialized by the 'probing_active' mutex.
>
> In fact, I suspect we should entirely disallow asynchronous irq
> probing, because while the probing itself is serialized wrt _other_
> autoprobing, it's not necessarily safe wrt other drivers allocating
> interrupts in a non-probing manner.
>
> So not only should we not bother to do irq autoprobing asynchronously
> (because it won't help), we also probably should make sure that there
> is no other driver doing any asynchronous "request_irq()" _while_ we
> probe. IOW, we should consider the "request_irq()" to be a globally
> ordered event, like requesting a major/minor number or registering a
> driver.
well.
or we declare the irq probing stuff "rare" and just make THAT fully
serializing....
do a full synchronization before starting a probe
(at that point no new async stuff can show up if it wouldn't show up
already right now), and be done with it.
> > > Does this patch make any difference to you? I'm not at all sure
> > > that it's the irq probing, but if it is, then this should make
> > > the serial probe go much faster.
> >
> > it turned it into a 25 msec deal .. pretty good improvement in my
> > book.
>
> Ok, that certainly makes it a non-issue. It's a scary change in the
> sense that it's touching code that we _never_ touch, and it's magic
> irq autoprobing stuff, but at the same time, 0.1 seconds for testing
> whether some spurious irq happens is a pretty ridiculous cost.
> Especially since we're only talking legacy ISA interrupts anyway. If
> we have screaming interrupts, they'll happen immediately, not after a
> tenth of a second.
>
> That said, I also wonder if we really even need to autoprobe the
> interrupts on any modern hardware. Rather than trying to speed up irq
> probing, maybe we could figure it out some other way.. The only thing
> that matters on 99% of all machines are the one or two standard ports
> that normally show up on 2f8h/irq3 and 3f8h/irq4 or something like
> that.
too bad this stuff isn't PCI enumerated.
but if someone really still maintains this code, it could probably be
rewritten in a "we think it's likely irq 3. how about we test that. Oh
no? then we do expensive probing" kind of way.
Right now I don't think I have time for it (this is going to take time..
there's so many weird things with serial ports that it's bound to break
stuff in the beginning etc)
--
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:04 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 [this message]
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
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=20090104110559.306186c4@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).