linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 00/17] Introduce a global lock to serialize all PCI hotplug
@ 2012-04-16 16:28 Jiang Liu
  2012-04-16 16:28 ` [PATCH RFC 01/17] PCI: introduce pci_bus_get()/pci_bus_put() to hide PCI implementation details Jiang Liu
                   ` (17 more replies)
  0 siblings, 18 replies; 21+ messages in thread
From: Jiang Liu @ 2012-04-16 16:28 UTC (permalink / raw)
  To: Yinghai Lu, Kenji Kaneshige, Greg Kroah-Hartman, Dely Sy,
	Scott Murray
  Cc: Jiang Liu, Jiang Liu, Keping Chen, linux-pci

There are multiple ways to trigger PCI hotplug requests concurrently,
such as:
1. Sysfs interfaces exported by the PCI core subsystem
2. Sysfs interfaces exported by the PCI hotplug subsystem
3. PCI hotplug events triggered by PCI Hotplug Controllers
4. ACPI hotplug events for PCI host bridges
5. Driver binding/unbinding events

The PCI core subsystem doesn't support concurrent hotplug operations yet,
so all PCI hotplug requests should be globally serialized. This patchset
introduces a global recursive rwsem to serialize all PCI hotplug operations.

Following PCI hotplug drivers/interfaces have been enhanced with this
1. Sysfs interfaces exported by the PCI core subsystem
2. Sysfs interfaces exported by the PCI hotplug subsystem
3. pciehp
4. shpchp
5. cpcihp_generic and cpcihp_zt5550
6. fakephp

But there are still several TODOs:
1) all other PCI hotplug driver in drivers/pci/hotplug directory
2) SR-IOV
3) acpiphp (plan to do this based on Yinghai's PCI root bus hotplug gate)
4) pci_root (plan to do this based on Yinghai's PCI root bus hotplug gate)

Basic test has been done as below, will find more hardwares to do more tests.
Start three scripts on an Intel Atom system to currently execute:
1) remove/rescan PCI devices by sysfs interfaces exported by PCI core subsystem
2) remove/rescan PCI devices by sysfs interfaces exported by fakephp driver
3) load/unload fakephp driver
The test has run about four hours without failure.

Jiang Liu (17):
  PCI: introduce pci_bus_get()/pci_bus_put() to hide PCI implementation
    details
  PCI: introduce recursive rwsem to serialize PCI hotplug operations
  PCI: replace pci_remove_rescan_mutex with the PCI hotplug lock
  PCI: serialize hotplug operations triggered by PCI hotplug sysfs
    interfaces
  PCI: correctly flush workqueue when destroy pcie hotplug controller
  PCI: prepare for serializing hotplug operations triggered by pciehp
    driver
  PCI: serialize hotplug operaitons triggered by the pciehp driver
  PCI: fix two race windows when probing/removing SHPC controller
  PCI: correctly flush workqueues and timer when destroy SHPC
    controller
  PCI: serialize hotplug operaitons triggered by the shpchp driver
  PCI: release IO resource in error handling path in
    cpcihp_generic_init()
  PCI: clean up all resources in error handling path in
    zt5550_hc_init_one()
  PCI: trivial code clean up in cpci_hotplug_core.c
  PCI: fix race windows when shutting down cpcihp controller
  PCI: hold a reference count to the PCI bus used by cpcihp drivers
  PCI: serialize PCI hotplug operations triggered by cpcihp drivers
  PCI: serialize PCI hotplug operations triggered by fakephp drivers

 drivers/pci/bus.c                       |   15 +++++
 drivers/pci/hotplug.c                   |   55 +++++++++++++++++
 drivers/pci/hotplug/cpci_hotplug_core.c |   53 +++++++++-------
 drivers/pci/hotplug/cpcihp_generic.c    |   30 +++++++---
 drivers/pci/hotplug/cpcihp_zt5550.c     |   21 +++++--
 drivers/pci/hotplug/fakephp.c           |   38 ++++++++++--
 drivers/pci/hotplug/pci_hotplug_core.c  |   26 ++++++--
 drivers/pci/hotplug/pciehp.h            |    5 +-
 drivers/pci/hotplug/pciehp_core.c       |   25 ++++++--
 drivers/pci/hotplug/pciehp_ctrl.c       |   56 ++++++++++++++++-
 drivers/pci/hotplug/pciehp_hpc.c        |   18 +++++-
 drivers/pci/hotplug/shpchp.h            |    3 +
 drivers/pci/hotplug/shpchp_core.c       |   11 ++--
 drivers/pci/hotplug/shpchp_ctrl.c       |   32 ++++++++++
 drivers/pci/hotplug/shpchp_hpc.c        |   36 +++++++-----
 drivers/pci/pci-sysfs.c                 |  100 +++++++++++++++++-------------
 drivers/pci/remove.c                    |    1 +
 include/linux/pci.h                     |   16 +++++
 18 files changed, 415 insertions(+), 126 deletions(-)

-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-04-17 14:53 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 16:28 [PATCH RFC 00/17] Introduce a global lock to serialize all PCI hotplug Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 01/17] PCI: introduce pci_bus_get()/pci_bus_put() to hide PCI implementation details Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 02/17] PCI: introduce recursive rwsem to serialize PCI hotplug operations Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 03/17] PCI: replace pci_remove_rescan_mutex with the PCI hotplug lock Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 04/17] PCI: serialize hotplug operations triggered by PCI hotplug sysfs interfaces Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 05/17] PCI: correctly flush workqueue when destroy pcie hotplug controller Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 06/17] PCI: prepare for serializing hotplug operations triggered by pciehp driver Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 07/17] PCI: serialize hotplug operaitons triggered by the " Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 08/17] PCI: fix two race windows when probing/removing SHPC controller Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 09/17] PCI: correctly flush workqueues and timer when destroy " Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 10/17] PCI: serialize hotplug operaitons triggered by the shpchp driver Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 11/17] PCI: release IO resource in error handling path in cpcihp_generic_init() Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 12/17] PCI: clean up all resources in error handling path in zt5550_hc_init_one() Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 13/17] PCI: trivial code clean up in cpci_hotplug_core.c Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 14/17] PCI: fix race windows when shutting down cpcihp controller Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 15/17] PCI: hold a reference count to the PCI bus used by cpcihp drivers Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 16/17] PCI: serialize PCI hotplug operations triggered " Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 17/17] PCI: serialize PCI hotplug operations triggered by fakephp drivers Jiang Liu
2012-04-16 21:33 ` [PATCH RFC 00/17] Introduce a global lock to serialize all PCI hotplug Greg KH
2012-04-17 11:57   ` Jiang Liu
2012-04-17 14:53   ` Jiang Liu

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