From: Linus Torvalds <torvalds@linux-foundation.org>
To: Greg KH <greg@kroah.com>
Cc: David Miller <davem@davemloft.net>,
cornelia.huck@de.ibm.com, bunk@stusta.de,
linux-kernel@vger.kernel.org
Subject: Re: Please revert 5adc55da4a7758021bcc374904b0f8b076508a11 (PCI_MULTITHREAD_PROBE)
Date: Wed, 9 May 2007 10:21:31 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.98.0705091010320.4062@woody.linux-foundation.org> (raw)
In-Reply-To: <20070509094418.GA13245@kroah.com>
On Wed, 9 May 2007, Greg KH wrote:
> On Tue, May 08, 2007 at 01:58:10PM -0700, David Miller wrote:
> >
> > 1) A proper dependency system is necessary
> >
> > 2) Proper mutual exclusion for shared system resources/registers/etc.
> > that are poked at in an ad-hoc unlocked manner currently
> >
> > Is that basically what it boils down to?
>
> Yes, that's about it.
>
> Number 1 seemed to cause the most crashes, I don't think number 2 ever
> caused any problems, but it might have, there were too many weird oopses
> to be able to rule that out.
One issue is that a lot of shared resources and their locking really
aren't known until *after* you've done a first-level probing.
The classic example of this really is a cardbus controller, and almost any
multi-function PCI device. Yes, they are "independent" PCI devices in
their own right, but they almost invariably have some shared state.
A bus driver that probes them concurrently is simply broken.
And no, the solution is not to special-case multi-function devices and
always probe the subfunctions serially. That would suck for many things
(disk controllers are *also* often subfunctions). The solution really *is*
to probe the devices serially, and let the layer that actually knows what
it is doing (the low-level driver) decide how it goes from there.
I can almost guarantee that the same is true of most other buses. For
example, I wouldn't be surprised at all to hear that you shouldn't probe
the individual LUN's of many "SCSI" devices concurrently. The number of
bugs in things like multifunction card readers (total lockup if you read
the wrong config pages or even try to read past the end of the flash etc)
is just scary.
(Server people seem to think that "SCSI" == "high-end expensive hardware
that we paid too much for", and yes, that's sometimes true, but "SCSI"
also equals "el-cheapo stuff that sells for $5 and talks something that
looks enough like SCSI commands that we want to consider it SCSI").
So I'm really convinced that the bus layer should be serial and then have
some capability to allow lower levels to do the things *they* know is fine
to do independently in a parallel way. But anything that makes that be a
bus-level choice is almost guaranteed to be broken on just about all
buses!
Linus
next prev parent reply other threads:[~2007-05-09 17: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 [this message]
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
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=alpine.LFD.0.98.0705091010320.4062@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=bunk@stusta.de \
--cc=cornelia.huck@de.ibm.com \
--cc=davem@davemloft.net \
--cc=greg@kroah.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
all inboxes | Powered by JetHome®