You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request: Report PCIe P2P Platform Routing Health
Summary
Please add a driver diagnostic which reports whether PCIe GPU-to-GPU peer traffic is likely to be routed directly, or degraded by platform ACS/IOMMU configuration.
For PCIe P2P-capable GPU pairs, the driver should report:
This should be visible in a support-friendly location such as kernel logs, nvidia-smi topo, nvidia-smi -q, /proc/driver/nvidia, or UVM peer debug output.
Motivation
PCIe P2P can be functionally available but perform badly when the platform routes peer traffic through the CPU/root complex or through translated IOMMU paths. Today, users often only discover this after running a bandwidth benchmark and then manually checking BIOS settings, kernel command line options, IOMMU groups, and PCIe ACS registers.
A clear driver-side diagnostic would make these failures much easier to recognize and report.
Conditions To Detect
ACS
For each PCIe P2P GPU pair, inspect the upstream PCIe path between both endpoints. If any bridge/root port on the path advertises and enables ACS P2P redirect bits, report a warning.
P2P platform routing check for GPU0 (0000:06:00.0) <-> GPU1 (0000:09:00.0): ACS: WARNING, P2P Request/Completion Redirect enabled on PCIe bridge 0000:00:03.0 (ACSCap=0xNN ACSCtl=0xNN); GPU-to-GPU PCIe traffic may be routed upstream through the root complex, reducing bandwidth. IOMMU Modes: OK, identity/identity.
IOMMU
For each GPU endpoint, report whether the active IOMMU/DMA domain is identity/passthrough or translated.
Example OK output:
IOMMU Modes: OK, identity/identity
Example warning output:
IOMMU Modes: WARNING, translated-dma/identity; translation is active for at least one GPU. If P2P bandwidth is low, boot with IOMMU passthrough, for example iommu=pt with the platform-specific IOMMU enabled.
Suggested Behavior
Do not fail P2P solely because ACS redirect or IOMMU translation is detected.
Treat this as a performance diagnostic, not a correctness gate.
Report at most once per physical GPU pair per driver/module load to avoid log spam.
Key de-duplication by physical PCI BDF pair, not by CUDA ordinal or transient UVM parent GPU ID.
Include both endpoint BDFs in the message.
Include the ACS bridge BDF and ACS capability/control values when warning.
Include the IOMMU mode for both endpoints.
Why This Should Be In The Driver
The driver already knows when a GPU pair is considered P2P-capable and which path is being used, such as PCIe BAR1 P2P versus NVLink. It is in the best position to explain that a pair is functionally supported but may be routed suboptimally by platform policy.
This also makes bug reports more actionable. A support log would immediately show whether the platform has:
ACS redirect enabled on the path.
IOMMU identity/passthrough mode.
IOMMU translated DMA mode.
A clean direct-routing configuration.
Prototype
A local prototype was implemented in UVM's parent peer initialization path:
Hook: after RM reports a parent GPU pair link type of PCIE or PCIE_BAR1.
ACS check: walk the upstream PCIe bridge path between both endpoints and inspect PCI_EXT_CAP_ID_ACS, PCI_ACS_CAP, and PCI_ACS_CTRL.
IOMMU check: inspect the Linux IOMMU domain for each GPU endpoint and classify as identity, none, translated-dma, translated, or unavailable.
De-duplication: sorted physical PCI BDF pair.
On a 4-GPU system, exercising all pairs produced exactly one line for each physical pair:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request: Report PCIe P2P Platform Routing Health
Summary
Please add a driver diagnostic which reports whether PCIe GPU-to-GPU peer traffic is likely to be routed directly, or degraded by platform ACS/IOMMU configuration.
For PCIe P2P-capable GPU pairs, the driver should report:
This should be visible in a support-friendly location such as kernel logs,
nvidia-smi topo,nvidia-smi -q,/proc/driver/nvidia, or UVM peer debug output.Motivation
PCIe P2P can be functionally available but perform badly when the platform routes peer traffic through the CPU/root complex or through translated IOMMU paths. Today, users often only discover this after running a bandwidth benchmark and then manually checking BIOS settings, kernel command line options, IOMMU groups, and PCIe ACS registers.
A clear driver-side diagnostic would make these failures much easier to recognize and report.
Conditions To Detect
ACS
For each PCIe P2P GPU pair, inspect the upstream PCIe path between both endpoints. If any bridge/root port on the path advertises and enables ACS P2P redirect bits, report a warning.
Relevant ACS control bits:
Example OK output:
Example warning output:
IOMMU
For each GPU endpoint, report whether the active IOMMU/DMA domain is identity/passthrough or translated.
Example OK output:
Example warning output:
Suggested Behavior
Why This Should Be In The Driver
The driver already knows when a GPU pair is considered P2P-capable and which path is being used, such as PCIe BAR1 P2P versus NVLink. It is in the best position to explain that a pair is functionally supported but may be routed suboptimally by platform policy.
This also makes bug reports more actionable. A support log would immediately show whether the platform has:
Prototype
A local prototype was implemented in UVM's parent peer initialization path:
PCIEorPCIE_BAR1.PCI_EXT_CAP_ID_ACS,PCI_ACS_CAP, andPCI_ACS_CTRL.identity,none,translated-dma,translated, orunavailable.On a 4-GPU system, exercising all pairs produced exactly one line for each physical pair:
All pairs reported:
Prototype Patch
The following patch shows the local prototype implementation against
kernel-open/nvidia-uvm/uvm_gpu.c:Acceptance Criteria
OKorWARNING.Beta Was this translation helpful? Give feedback.
All reactions