1. Optimize DMABUF Mkey Page Size in mlx5
優化 mlx5 中的 DMABUF Mkey 頁大小
This patch series enables the mlx5 driver to dynamically select the optimal page size for DMABUF-based memory keys (mkeys), rather than relying on a fixed page size during registration.
該補丁集使 mlx5 驅動能夠為基于 DMABUF 的內存密鑰(mkey)動態選擇最優的頁大小,而不再在注冊時依賴固定的頁大小。
Previously, DMABUF memory registration always used a fixed 4KB page size for mkeys. This could lead to suboptimal performance, especially when the underlying memory layout supports larger page sizes.
此前,DMABUF 內存注冊始終為 mkey 使用固定的 4KB 頁大小。這種做法在底層內存布局支持更大頁大小的情況下,會導致性能不佳。
The previous approach did not leverage the hardware's advertised capabilities for larger page sizes. Moreover, the driver failed to set the appropriate page size mask in the mkey configuration, which could result in invalid registrations when switching to very large pages.
這種舊的實現方式沒有利用硬件公開支持的大頁能力。此外,驅動程序在配置 mkey 時未設置正確的頁大小掩碼,在切換到非常大的頁時可能導致注冊無效。
This series improves DMABUF performance by:
本系列補丁通過以下方式提升了 DMABUF 的性能:
Dynamically selecting the best page size for a given memory region (MR) at creation time and upon page faults.
在內存區域(MR)創建時以及發生頁錯誤時,動態選擇最合適的頁大小。
Correcting gaps in the previous implementation related to page size mask handling.
修復了此前實現中關于頁大小掩碼處理的缺陷。
By reducing the number of page table entries (and thus MTT/KSM descriptors) that the Host Channel Adapter (HCA) must walk through, this optimization lowers cache-line fetches and improves overall efficiency.
通過減少主機通道適配器(HCA)需遍歷的頁表項數量(從而減少 MTT/KSM 描述符),此優化降低了緩存行的訪問次數,提高了整體效率。
2. RDMA: Support CQs with User Memory
RDMA:支持使用用戶空間內存創建 CQ
This patch series introduces a standardized mechanism for creating Completion Queues (CQs) using preallocated memory supplied by userspace.
本系列補丁引入了一種標準化機制,允許使用用戶空間預分配的內存創建完成隊列(C