From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Adrian Bunk <bunk@stusta.de>, Greg K-H <greg@kroah.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Please revert 5adc55da4a7758021bcc374904b0f8b076508a11 (PCI_MULTITHREAD_PROBE)
Date: Tue, 8 May 2007 21:21:17 +0200 [thread overview]
Message-ID: <20070508212117.0be9dfe5@gondolin.boeblingen.de.ibm.com> (raw)
In-Reply-To: <alpine.LFD.0.98.0705081123080.3974@woody.linux-foundation.org>
On Tue, 8 May 2007 11:30:03 -0700 (PDT),
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> It's better because then the *driver* can decide whether it supports
> threaded probing or not.
Is there any reason why a driver shouldn't be able to handle probing
several devices at once? What if two devices become hotplugged at the
same time? Does this imply that the bus _always_ needs to do some
serializing there?
> Also, quite frankly, when this came up I already posted a much better
> approach for allowing arbitrary threading. It was ignored, but maybe you
> want to take a look.
>
> See
>
> http://lkml.org/lkml/2006/10/27/185
>
> for last time this came up. Any driver can decide to do
>
> execute_in_parallel(myprobe, myarguments);
>
> and that really *simple* thing allows synchronization points
> ("wait_for_parallel()") and arbitrary setting of the allowed parallelism.
Yeah, I saw this back then. But this is much too inflexible. How do you
determine the settings? On a large system, you could throttle too much,
obliterating most of the benefits of the parallel approach; on a small
system, you could overwhelm the system.
> I really think that is a *much* better approach. It allows, for example,
> the driver to do certain things (like name allocations and any
> particularly *fast* parts of probing) synchronously, and then do slow
> things (like spinning up disks and actually reading the partition tables)
> asynchronously.
Hm, I think "asynchronous" is the key word here, not "multithreaded".
Thinking some more of it, we really want to do the following:
- look at the device:
- do the fast stuff
- kick off the slow stuff
- look at the next device
- ...
- wait until all devices said they are finished
- each device needs to signal completion when the slow stuff has been
done (or hit a timeout)
(By some curious accident, that is what s390 cio does :))
This way, we are much more flexible than with the execute_in_parallel()
approach. This async approach especially looks suited to stuff where
some kind of operation is submitted to the hardware and we need to wait
for an interrupt/completion. And for that kind of operations, it scales
equally well on small or big machines.
> Anyway, I will refuse to merge anything that does generic bus-level
> (unless the bus is something off-the-board like SCSI) parallelism, unless
> you can really show me how superior and stable it is. I seriously doubt
> you can. We tried it once, and it was a total disaster.
Maybe the criterion should be more "a resonably unified set of
devices". s390 channel attached devices are really all the same (at a
certain not driver-specific level), and the same may be true for
something like scsi. pci may be just too diverse with too many
dissimilar drivers.
next prev parent reply other threads:[~2007-05-08 19:22 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 13:37 Cornelia Huck
2007-05-08 14:07 ` Greg KH
2007-05-08 20:58 ` David Miller
2007-05-09 9:44 ` Greg KH
2007-05-09 17:21 ` Linus Torvalds
2007-05-08 14:11 ` Adrian Bunk
2007-05-08 14:41 ` Cornelia Huck
2007-05-08 15:27 ` Linus Torvalds
2007-05-08 16:38 ` Cornelia Huck
2007-05-08 16:47 ` david
2007-05-08 21:45 ` Stefan Richter
2007-05-08 18:30 ` Linus Torvalds
2007-05-08 19:21 ` Cornelia Huck [this message]
2007-05-08 19:31 ` Linus Torvalds
2007-05-08 20:01 ` Linus Torvalds
2007-05-08 20:26 ` david
2007-05-09 7:58 ` Cornelia Huck
2007-05-09 8:33 ` david
2007-05-09 9:15 ` Cornelia Huck
2007-05-09 9:25 ` david
2007-05-09 13:20 ` Cornelia Huck
2007-05-09 16:18 ` david
2007-05-09 17:07 ` Cornelia Huck
2007-05-09 17:09 ` david
2007-05-09 17:48 ` Cornelia Huck
2007-05-09 17:53 ` david
2007-05-09 18:36 ` Cornelia Huck
2007-05-09 18:52 ` david
2007-05-10 7:38 ` Cornelia Huck
2007-05-09 17:07 ` Greg KH
2007-05-09 17:25 ` Linus Torvalds
2007-05-09 9:30 ` Stefan Richter
2007-05-09 22:21 ` Phillip Susi
2007-05-09 22:37 ` Stefan Richter
2007-05-10 14:23 ` Phillip Susi
2007-05-10 14:55 ` Stefan Richter
2007-05-11 7:22 ` Cornelia Huck
2007-05-08 20:51 ` Cornelia Huck
2007-05-08 21:41 ` David Miller
2007-05-09 9:55 ` Greg KH
2007-05-09 8:14 ` Duncan Sands
2007-05-09 8:45 ` Cornelia Huck
2007-05-09 9:16 ` Duncan Sands
2007-05-09 12:37 ` Cornelia Huck
2007-05-08 20:36 ` Cornelia Huck
2007-05-09 9:53 ` Greg KH
2007-05-09 13:38 ` Cornelia Huck
2007-05-09 16:42 ` Greg KH
2007-05-09 16:50 ` david
2007-05-09 17:14 ` Cornelia Huck
2007-05-09 17:09 ` Linus Torvalds
2007-05-08 21:15 ` David Miller
2007-05-08 22:19 ` Stefan Richter
2007-05-09 9:46 ` Greg KH
2007-05-08 15:15 ` Linus Torvalds
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=20070508212117.0be9dfe5@gondolin.boeblingen.de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=bunk@stusta.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®