Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH RFC 0/8] pci: rescan/remove locking rework
@ 2024-07-22 15:19 Keith Busch
  2024-07-22 15:19 ` [PATCH RFC 1/8] pci: make pci_stop_dev concurrent safe Keith Busch
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Keith Busch @ 2024-07-22 15:19 UTC (permalink / raw)
  To: linux-pci, bhelgaas, lukas; +Cc: mika.westerberg, Keith Busch

From: Keith Busch <kbusch@kernel.org>

This patch set targets a subset of pci bus scanning and removals that
were shown to be problematic with deep pci topologies that support
native hotplug. I've tried to capture the common pci components, but
there are definitely many subsystems accessing the topology in their own
way, many of which I can't possibly test, and I have not tried to
convert every user to this new locking scheme. However, if I did this
correctly, they should be no worse off than today!

The earlier patches are just cleanups and/or making it a little easier
to change the locking schemes. The real stuff happens from patches 7 and
8.

I've run this with lockdep enabled, tested concurrent hotplug events on
various x86 platforms with layers of pci switches. That said, as
mentioned earlier, there are many paths to here that I haven't been able
to test, so the final patch might be considered experimental.

Manual concurrent concurrent device removals is still broken. I've sent
a different patch for that here, but it does not sound like it is
acceptable:

  https://lore.kernel.org/linux-pci/20240719185513.3376321-1-kbusch@meta.com/T/#u

Keith Busch (8):
  pci: make pci_stop_dev concurrent safe
  pci: make pci_destroy_dev concurrent safe
  pci: move the walk bus lock to where its needed
  pci: walk bus recursively
  pci: unexport pci_walk_bus_locked
  pci: add helpers for stop and remove bus
  pci: reference count subordinate
  pci: use finer grain locking for bus protection

 drivers/pci/bus.c                | 70 ++++++++++++-------------
 drivers/pci/hotplug/pciehp_pci.c | 21 +++++---
 drivers/pci/pci-sysfs.c          |  2 +
 drivers/pci/pci.c                | 31 ++++++++---
 drivers/pci/pci.h                | 16 +++++-
 drivers/pci/pcie/aspm.c          |  7 ++-
 drivers/pci/probe.c              | 16 +++++-
 drivers/pci/remove.c             | 90 +++++++++++++++++++-------------
 include/linux/pci.h              | 11 ++++
 9 files changed, 175 insertions(+), 89 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-08-21 11:01 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22 15:19 [PATCH RFC 0/8] pci: rescan/remove locking rework Keith Busch
2024-07-22 15:19 ` [PATCH RFC 1/8] pci: make pci_stop_dev concurrent safe Keith Busch
2024-08-15 14:17   ` Jonathan Cameron
2024-08-20 15:02     ` Keith Busch
2024-08-21 11:01       ` Jonathan Cameron
2024-07-22 15:19 ` [PATCH RFC 2/8] pci: make pci_destroy_dev " Keith Busch
2024-08-15 14:18   ` Jonathan Cameron
2024-07-22 15:19 ` [PATCH RFC 3/8] pci: move the walk bus lock to where its needed Keith Busch
2024-08-15 14:20   ` Jonathan Cameron
2024-07-22 15:19 ` [PATCH RFC 4/8] pci: walk bus recursively Keith Busch
2024-08-15 14:33   ` Jonathan Cameron
2024-07-22 15:19 ` [PATCH RFC 5/8] pci: unexport pci_walk_bus_locked Keith Busch
2024-08-15 14:36   ` Jonathan Cameron
2024-07-22 15:19 ` [PATCH RFC 6/8] pci: add helpers for stop and remove bus Keith Busch
2024-08-15 14:49   ` Jonathan Cameron
2024-07-22 15:19 ` [PATCH RFC 7/8] pci: reference count subordinate Keith Busch
2024-08-15 15:10   ` Jonathan Cameron
2024-07-22 15:19 ` [PATCH RFC 8/8] pci: use finer grain locking for bus protection Keith Busch
2024-08-15 15:21   ` Jonathan Cameron
2024-08-15 17:05     ` Keith Busch
2024-08-07 15:40 ` [PATCH RFC 0/8] pci: rescan/remove locking rework Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox