RDMA/umem: Combine contiguous PAGE_SIZE regions in SGEs
Combine contiguous regions of PAGE_SIZE pages into single scatter list entry while building the scatter table for a umem. This minimizes the number of the entries in the scatter list and reduces the DMA mapping overhead, particularly with the IOMMU. Set default max_seg_size in core for IB devices to 2G and do not combine if we exceed this limit. Also, purge npages in struct ib_umem as we now DMA map the umem SGL with sg_nents and npage computation is not needed. Drivers should now be using ib_umem_num_pages(), so fix the last stragglers. Move npages tracking to ib_umem_odp as ODP drivers still need it. Suggested-by:Jason Gunthorpe <jgg@ziepe.ca> Reviewed-by:
Michael J. Ruhl <michael.j.ruhl@intel.com> Reviewed-by:
Ira Weiny <ira.weiny@intel.com> Acked-by:
Adit Ranadive <aditr@vmware.com> Signed-off-by:
Shiraz Saleem <shiraz.saleem@intel.com> Tested-by:
Gal Pressman <galpress@amazon.com> Tested-by:
Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
Showing
- drivers/infiniband/core/device.c 3 additions, 0 deletionsdrivers/infiniband/core/device.c
- drivers/infiniband/core/umem.c 81 additions, 20 deletionsdrivers/infiniband/core/umem.c
- drivers/infiniband/core/umem_odp.c 2 additions, 2 deletionsdrivers/infiniband/core/umem_odp.c
- drivers/infiniband/hw/mlx5/odp.c 1 addition, 1 deletiondrivers/infiniband/hw/mlx5/odp.c
- drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c 6 additions, 5 deletionsdrivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c
- include/rdma/ib_umem.h 1 addition, 1 deletioninclude/rdma/ib_umem.h
- include/rdma/ib_umem_odp.h 1 addition, 0 deletionsinclude/rdma/ib_umem_odp.h
Loading
Please register or sign in to comment