Re: [PATCH v4 00/15] PCI: let the core manage slot names

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alex Chiang
Date: Wednesday, October 8, 2008 - 9:19 pm

* Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:

Hi Kenji-san,

Thanks for doing this work.

I tested your patches, but found a problem with refcounting in
your 02/03, and the slot directories in sysfs remained, even
after rmmod of all drivers.

I decided that things are getting too complicated with all these
new interfaces, so I got rid of them and updated the
pci_create_slot API instead, to take a 'rename' parameter. That
way, creating a slot and overriding its name can become an atomic
operation.

That should make the race conditions go away, and the code is
much easier to understand as well.


This is a good patch by itself. I think you should submit it to
Jesse. I did not need it after reworking to my new design.


I had to stare at this patch for a long time to understand it,
and finally saw that you were changing the rename logic to detect
if we were trying to rename an existing slot.

Unfortunately, it had some problem with the refcounting, and in
this scenario:

	- pci_slot loaded
	- fakephp dup_slots=1 loaded
	- pci_slot unloaded

The slots claimed by pci_slot (but _not_ by fakephp) were never
released.

By the time I got this far, I was already thinking about a
redesign, so I did not try and debug further...


Not needed, since I re-designed the approach.


Again, thank you very much for all the review and hard work, and
sorry for causing so much churn. :-/

I'll be sending out the new patch series shortly.

/ac

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v4 00/15] PCI: let the core manage slot names, Alex Chiang, (Fri Oct 3, 4:17 pm)
[PATCH v4 03/15] PCI: prevent duplicate slot names, Alex Chiang, (Fri Oct 3, 4:17 pm)
[PATCH v4 14/15] PCI: Hotplug core: remove 'name', Alex Chiang, (Fri Oct 3, 4:18 pm)
Re: [PATCH v4 03/15] PCI: prevent duplicate slot names, Kenji Kaneshige, (Tue Oct 7, 11:00 pm)
Re: [PATCH v4 00/15] PCI: let the core manage slot names, Kenji Kaneshige, (Tue Oct 7, 11:31 pm)
[01/03] Sample patch for [PATCH v4 02/15] , Kenji Kaneshige, (Tue Oct 7, 11:33 pm)
[02/03] Sample patch for [PATCH v4 03/15], Kenji Kaneshige, (Tue Oct 7, 11:34 pm)
[03/03] Sample patch for [PATCH v4 14/15], Kenji Kaneshige, (Tue Oct 7, 11:36 pm)
Re: [PATCH v4 00/15] PCI: let the core manage slot names, Alex Chiang, (Wed Oct 8, 9:19 pm)
Re: [PATCH v4 00/15] PCI: let the core manage slot names, Kenji Kaneshige, (Wed Oct 8, 10:01 pm)