linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/4] Limiting pci access requsets
@ 2016-09-06 22:00 Keith Busch
  2016-09-06 22:00 ` [PATCHv2 1/4] pci: Add is_removed state Keith Busch
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Keith Busch @ 2016-09-06 22:00 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas; +Cc: Jon Derrick, Wei Zhang, Keith Busch

Here's version two of this, and is even more aggressive than before
about reducing access that we know will end in failure.

The first two patches are new. It attempts to completely remove config
space access on removed devices.

Patch 1/4 adds a new state to pci_dev called "is_removed" that's set
when the device is detected to be inaccessible.

Patch 2/4 returns immediately from any config space access request on
devices in such a state so we don't rely on hardware to handle this.

I dropped the patch to abort searching pcie extended capabilities. Caching
the AER capability obviates any immediate need for that.

Patch 3/4 moves the cached aer_cap from the aer driver's private structure
to the pci_dev structure so all devices in the sub-tree know about this
capability postition.

Patch 4/4 is still skipping disabling MSI-x when removed, and I added a
new check prior to writing any MSI messages as well. The criteria being
checked is the new "is_removed" state rather than verifying the VID/DID is
valid, which potentially just introduces additional config space access.

This series reduces the number of non-functional MMIO and config space
accesses on a hot removed device from ~1000 commands to ~1, improving
software's time to teardown surprise removed devices.

Keith Busch (4):
  pci: Add is_removed state
  pci: No config access for removed devices
  pcie/aer: Cache capability position
  pci/msix: Skip disabling removed devices

 drivers/pci/hotplug/pciehp_pci.c   |  2 ++
 drivers/pci/msi.c                  |  7 ++++++-
 drivers/pci/pci.c                  |  9 ++++++++-
 drivers/pci/pcie/aer/aerdrv.c      | 10 +++++-----
 drivers/pci/pcie/aer/aerdrv_core.c | 12 ++++++------
 drivers/pci/pcie/pcie-dpc.c        |  1 +
 drivers/pci/probe.c                |  2 ++
 include/linux/pci.h                | 20 ++++++++++++++++++++
 8 files changed, 50 insertions(+), 13 deletions(-)

-- 
2.7.2


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

end of thread, other threads:[~2016-09-19 17:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-06 22:00 [PATCHv2 0/4] Limiting pci access requsets Keith Busch
2016-09-06 22:00 ` [PATCHv2 1/4] pci: Add is_removed state Keith Busch
2016-09-07 11:14   ` Lukas Wunner
2016-09-17  8:35   ` Lukas Wunner
2016-09-19 17:47     ` Keith Busch
2016-09-06 22:00 ` [PATCHv2 2/4] pci: No config access for removed devices Keith Busch
2016-09-07 12:03   ` kbuild test robot
2016-09-07 16:28     ` Keith Busch
2016-09-06 22:00 ` [PATCHv2 3/4] pcie/aer: Cache capability position Keith Busch
2016-09-07 11:30   ` Lukas Wunner
2016-09-13 22:07     ` Bjorn Helgaas
2016-09-06 22:00 ` [PATCHv2 4/4] pci/msix: Skip disabling removed devices Keith Busch
2016-09-07 13:28 ` [PATCHv2 0/4] Limiting pci access requsets Lukas Wunner

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