Skip to contentSkip to conversation

iommu/vt-d: Allocate local memory for page request queue

PATCH In review Jacob Pan 3 participants 3 messages Apr 3, 2024 – Apr 11, 2024

Subsystems (2)
lore
Share & tools
lore

Jacob Pan

author
#0 lore raw

PATCH 1/1 iommu/vt-d: Allocate local memory for page request queue

The page request queue is per IOMMU, its allocation should be made NUMA-aware for performance reasons.

---
 drivers/iommu/intel/svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel/svm.c +1 -1
index c1bed89b1026..ee3b469e2da1 100644
@@ -66,7 +66,7 @@ int intel_svm_enable_prq(struct intel_iommu *iommu)
 	struct page *pages;
 	int irq, ret;
 
-	pages = alloc_pages(GFP_KERNEL | __GFP_ZERO, PRQ_ORDER);
+	pages = alloc_pages_node(iommu->node, GFP_KERNEL | __GFP_ZERO, PRQ_ORDER);
 	if (!pages) {
 		pr_warn("IOMMU: %s: Failed to allocate page request queue\n",
 			iommu->name);
Signature · 1 line
2.25.1
maintainer
#2 lore raw
Quoted 8 lines · Kevin
Quoted 7 lines

From: Jacob Pan<[email protected]>
Sent: Thursday, April 4, 2024 5:40 AM

The page request queue is per IOMMU, its allocation should be made NUMA-aware for performance reasons.

Add below fix tag and queue it for v6.9-rc.

Fixes a222a7f0bb6c ("iommu/vt-d: Implement page request handling")

Best regards,
baolu