Skip to content

Commit ea661ad

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: Size Page Request Queue to avoid overflow condition
PRQ overflow may cause I/O throughput congestion, resulting in unnecessary degradation of I/O performance. Appropriately increasing the length of PRQ can greatly reduce the occurrence of PRQ overflow. The count of maximum page requests that can be generated in parallel by a PCIe device is statically defined in the Outstanding Page Request Capacity field of the PCIe ATS configure space. The new length of PRQ is calculated by summing up the value of Outstanding Page Request Capacity register across all devices where Page Requests are supported on the real PR-capable platform (Intel Sapphire Rapids). The result is round to the nearest higher power of 2. The PRQ length is also double sized as the VT-d IOMMU driver only updates the Page Request Queue Head Register (PQH_REG) after processing the entire queue. Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent bac4e77 commit ea661ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/intel-svm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define __INTEL_SVM_H__
1010

1111
/* Page Request Queue depth */
12-
#define PRQ_ORDER 2
12+
#define PRQ_ORDER 4
1313
#define PRQ_RING_MASK ((0x1000 << PRQ_ORDER) - 0x20)
1414
#define PRQ_DEPTH ((0x1000 << PRQ_ORDER) >> 5)
1515

0 commit comments

Comments
 (0)