LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: Greg KH <gregkh@suse.de>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	Matthew Wilcox <matthew@wil.cx>, Gary Hade <garyhade@us.ibm.com>,
	kaneshige.kenji@jp.fujitsu.com, warthog19@eaglescrag.net,
	kristen.c.accardi@intel.com, rick.jones2@hp.com,
	linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH 4/4] ACPI PCI slot detection driver
Date: Tue, 4 Mar 2008 16:09:37 -0700	[thread overview]
Message-ID: <20080304230937.GD3694@ldl.fc.hp.com> (raw)
In-Reply-To: <20080304193036.GB5534@suse.de>

* Greg KH <gregkh@suse.de>:
> On Tue, Mar 04, 2008 at 10:18:28AM -0800, Jesse Barnes wrote:
> > On Monday, March 03, 2008 9:49 pm Greg KH wrote:
> > > On Sat, Mar 01, 2008 at 07:43:07AM -0700, Matthew Wilcox wrote:
> > > > On Fri, Feb 29, 2008 at 09:25:42PM -0800, Greg KH wrote:
> > > > > What is the guarantee that the names of these slots are correct and do
> > > > > not happen to be the same as the hotpluggable ones?
> > > >
> > > > That would be a bug -- and yes, bugs happen, and we have to deal with
> > > > them.
> > >
> > > My main concern is that BIOS vendors will not fix these bugs, as no
> > > other OS cares/does this kind of thing today.  The ammount of bad
> > > information out there might be quite large, and I think this was
> > > confirmed by some initial testing of IBM systems, right?
> > 
> > Yeah, but there's a flip side to this too:  if no one uses the data, no one 
> > will complain when it's wrong.  If Linux starts making it easy to see this 
> > stuff, there's a chance system vendors will start taking an extra 5 min. 
> > before shipment to make sure that the BIOS info is up to date...
> > 
> > OTOH, I'm not sure which is worse, bad data or no data.
> 
> bad data is worse.
> 
> And then there's the machines with duplicate slot names, how does this
> code handle PCI slots with that?  I think some of the IBM machines had
> non-hotplug slots named the same as the hotplug slots, right?

At one point, I had some code in there to stick the names of the
slots into a linked list and walk through it to try and detect
duplicate slot names, but after a few iterations, the cases I was
dealing with, it turned out to be easier to refcount them.

[my machines did not have colliding names between hp and non-hp
slots, it was more like seeing the same SxFy object appear
multiple times in the namespace and trying to create them
multiple times.]

It wasn't the IBM machine that was breaking; it was Fujitsu. They
were returning an error code (the numerical value 1023) when I
called the _SUN method on a slot object that existed in the ACPI
namespace but was not present (as reported by the _STA method).

By the time I got that error report, I'd already dropped the
duplicate name detection code, and was letting the kobject
infrastructure warn about duplicate names because for my test
cases, refcounting was a better solution.

[Kenji-san from Fujitsu seemed to be ok with the progress I'd
made at the time, he can speak up if he's changed his mind ;)]

But even that is not the error case you're describing, where
there is clear name collision of two physical slots in the
machine, one being hotplug, the other non-hotplug.

Maybe I would have to add some duplicate name detection code back
in there but...

> This stuff needs a _lot_ of testing on a lot of different
> machines, and a sane way to fall-back if there are errors to
> ensure that working machines don't break.
> 
> And then there's the issue with userspace programs only expecting
> hotplugable slots in the slots/ directory...

Yes -- totally agreed. And I'd like to see actual examples of
name collisions or userspace breakage to get a better idea of how
to handle real world problems rather than writing some crummy
code based on what my limited imagination can think of.

So how to get this test coverage? -mm? linux-next?

Thanks.

/ac


  parent reply	other threads:[~2008-03-04 23:17 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29  0:23 [PATCH 0/4, v7] PCI, ACPI: Physical PCI slot objects Alex Chiang
2008-02-29  0:26 ` [PATCH 1/4] Remove path attribute from sgi_hotplug Alex Chiang
2008-03-03 18:48   ` Jesse Barnes
2008-03-03 18:54     ` Prarit Bhargava
2008-03-05  0:19       ` Alex Chiang
2008-02-29  0:27 ` [PATCH 2/4] Construct one fakephp slot per pci slot Alex Chiang
2008-02-29  0:28 ` [PATCH 3/4] Introduce pci_slot Alex Chiang
2008-03-01  5:24   ` Greg KH
2008-03-03 20:56     ` Alex Chiang
2008-03-04  5:58       ` Greg KH
2008-03-04 23:30   ` [PATCH 3/4, v8] " Alex Chiang
2008-02-29  0:29 ` [PATCH 4/4] ACPI PCI slot detection driver Alex Chiang
2008-03-01  5:25   ` Greg KH
2008-03-01 14:43     ` Matthew Wilcox
2008-03-04  5:49       ` Greg KH
2008-03-04 18:18         ` Jesse Barnes
2008-03-04 19:30           ` Greg KH
2008-03-04 20:02             ` Jesse Barnes
2008-03-04 20:12             ` Kristen Carlson Accardi
2008-03-04 23:09             ` Alex Chiang [this message]
2008-03-05  1:11               ` Kenji Kaneshige
2008-03-05 20:20                 ` Alex Chiang
2008-03-05 20:34                   ` Matthew Wilcox
2008-03-06  2:07                   ` Kenji Kaneshige
2008-03-11 13:10                   ` Kenji Kaneshige
2008-03-11 13:13                     ` [PATCH 3/(3+1)] " Kenji Kaneshige
2008-03-11 13:17                       ` Kenji Kaneshige
2008-03-11 13:19                     ` [PATCH 4/(3+1)] Add quirks for " Kenji Kaneshige
2008-03-11 13:28                     ` [PATCH 4/4] " Matthew Wilcox
2008-03-11 16:56                       ` Jesse Barnes
2008-03-12  5:51                         ` Kenji Kaneshige
2008-03-12  4:08                       ` Kenji Kaneshige
2008-03-11 18:04                     ` Kristen Carlson Accardi
2008-03-11 19:14                       ` Alex Chiang
2008-03-12 11:33                         ` Kenji Kaneshige
2008-03-13  3:24                           ` Alex Chiang
2008-03-14  2:16                             ` Gary Hade
2008-03-14  5:34                               ` Kenji Kaneshige
2008-03-18 20:49                                 ` Alex Chiang
2008-03-12 10:50                       ` Kenji Kaneshige
2008-03-11 23:34                     ` Kristen Carlson Accardi
2008-03-12 12:59                       ` Kenji Kaneshige
2008-03-04 22:58         ` Alex Chiang
2008-03-04 23:15           ` Greg KH
2008-03-04 23:46             ` Alex Chiang
2008-03-01  5:12 ` [PATCH 0/4, v7] PCI, ACPI: Physical PCI slot objects Greg KH
2008-03-03 23:35   ` Alex Chiang
2008-03-04  5:56     ` Greg KH
2008-03-25  4:13 [PATCH 0/4, v11] " Alex Chiang
2008-03-25  4:17 ` [PATCH 4/4] ACPI PCI slot detection driver Alex Chiang
2008-03-25  4:50   ` Kenji Kaneshige
2008-03-25 17:09 [PATCH 0/4, v12] PCI, ACPI: Physical PCI slot objects Alex Chiang
2008-03-25 17:14 ` [PATCH 4/4] ACPI PCI slot detection driver Alex Chiang

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=20080304230937.GD3694@ldl.fc.hp.com \
    --to=achiang@hp.com \
    --cc=garyhade@us.ibm.com \
    --cc=gregkh@suse.de \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=kristen.c.accardi@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=matthew@wil.cx \
    --cc=rick.jones2@hp.com \
    --cc=warthog19@eaglescrag.net \
    --subject='Re: [PATCH 4/4] ACPI PCI slot detection driver' \
    /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

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).