Skip to contentSkip to conversation

drm/amdkfd: Define config HSA_AMD_P2P to support peer-to-peer

PATCH In review Ramesh Errabolu 2 participants 2 messages Jun 3, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/amdkfd: Define config HSA_AMD_P2P to support peer-to-peer

Extend current kernel config requirements of amdgpu by adding config HSA_AMD_P2P. Enabling HSA_AMD_P2P is REQUIRED to support peer-to-peer communication between AMD GPU devices over PCIe bus

---
 drivers/gpu/drm/amd/amdkfd/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/amdkfd/Kconfig +14 -0
index 8cc0a76ddf9f..93bd4eda0d94 100644
@@ -25,3 +25,17 @@ config HSA_AMD_SVM
 	  preemptions and one based on page faults. To enable page fault
 	  based memory management on most GFXv9 GPUs, set the module
 	  parameter amdgpu.noretry=0.
+
+config HSA_AMD_P2P
+	bool "HSA kernel driver support for peer-to-peer for AMD GPU devices"
+	depends on HSA_AMD && PCI_P2PDMA && DMABUF_MOVE_NOTIFY
+	help
+	  Enable peer-to-peer (P2P) communication between AMD GPUs over
+	  the PCIe bus. This can improve performance of multi-GPU compute
+	  applications and libraries by enabling GPUs to access data directly
+	  in peer GPUs' memory without intermediate copies in system memory.
+
+	  This P2P feature is only enabled on compatible chipsets, and between
+	  GPUs with large memory BARs that expose the entire VRAM in PCIe bus
+	  address space within the physical address limits of the GPUs.
+
Signature · 1 line
2.35.1
maintainer Reviewed-by on v1 1/3
#1 lore raw
Quoted 5 lines · Ramesh Errabolu

Extend current kernel config requirements of amdgpu by adding config HSA_AMD_P2P. Enabling HSA_AMD_P2P is REQUIRED to support peer-to-peer communication between AMD GPU devices over PCIe bus

This patch is

Quoted 26 lines
---
  drivers/gpu/drm/amd/amdkfd/Kconfig | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/amdkfd/Kconfig +14 -0
index 8cc0a76ddf9f..93bd4eda0d94 100644
@@ -25,3 +25,17 @@ config HSA_AMD_SVM
  	  preemptions and one based on page faults. To enable page fault
  	  based memory management on most GFXv9 GPUs, set the module
  	  parameter amdgpu.noretry=0.
+
+config HSA_AMD_P2P
+	bool "HSA kernel driver support for peer-to-peer for AMD GPU devices"
+	depends on HSA_AMD && PCI_P2PDMA && DMABUF_MOVE_NOTIFY
+	help
+	  Enable peer-to-peer (P2P) communication between AMD GPUs over
+	  the PCIe bus. This can improve performance of multi-GPU compute
+	  applications and libraries by enabling GPUs to access data directly
+	  in peer GPUs' memory without intermediate copies in system memory.
+
+	  This P2P feature is only enabled on compatible chipsets, and between
+	  GPUs with large memory BARs that expose the entire VRAM in PCIe bus
+	  address space within the physical address limits of the GPUs.
+