Optimize DMABUF mkey page size in mlx5
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | net/mlx5: Expose HCA capability bits for mkey max page sizeinclude/ | +3 | 0 replies | |
| 2/4 | RDMA/mlx5: Fix UMR modifying of mkey page sizedrivers/ include/ | +5 | 0 replies | |
| 3/4 | RDMA/mlx5: Align mkc page size capability check to PRMdrivers/ drivers/ | +52 | 0 replies | |
| 4/4 | RDMA/mlx5: Optimize DMABUF mkey page sizedrivers/ drivers/ drivers/ +1 more | +327 | 0 replies |
Reviews trailers per patch
2 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Michael Guralnik |
|---|---|
| 1/4 | |
| 2/4 | R-b |
| 3/4 | |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH rdma-next 0/4] Optimize DMABUF mkey page size in mlx5
From Edward:
This patch series enables the mlx5 driver to dynamically choose the optimal page size for a DMABUF-based memory key (mkey), rather than always registering with a fixed page size.
Previously, DMABUF memory registration used a fixed 4K page size for mkeys which could lead to suboptimal performance when the underlying memory layout may offer better page sizes.
This approach did not take advantage of larger page size capabilities advertised by the HCA, and the driver was not setting the proper page size mask in the mkey mask when performing page size changes, potentially leading to invalid registrations when updating to a very large pages.
This series improves DMABUF performance by dynamically selecting the best page size for a given memory region (MR) both at creation time and on page fault occurrences, based on the underlying layout and fixing related gaps and bugs.
By doing so, we reduce the number of page table entries (and thus MTT/ KSM descriptors) that the HCA must traverse, which in turn reduces cache-line fetches.
Thanks
Edward Srouji (2):
RDMA/mlx5: Fix UMR modifying of mkey page size
RDMA/mlx5: Optimize DMABUF mkey page size
Michael Guralnik (2):
net/mlx5: Expose HCA capability bits for mkey max page size RDMA/mlx5: Align mkc page size capability check to PRM
drivers/infiniband/hw/mlx5/mlx5_ib.h | 77 +++++-- drivers/infiniband/hw/mlx5/mr.c | 10 +- drivers/infiniband/hw/mlx5/odp.c | 31 ++- drivers/infiniband/hw/mlx5/umr.c | 306 ++++++++++++++++++++++++--- drivers/infiniband/hw/mlx5/umr.h | 13 +- include/linux/mlx5/device.h | 1 + include/linux/mlx5/mlx5_ifc.h | 4 +- 7 files changed, 387 insertions(+), 55 deletions(-)
Signature · 1 line
2.50.0