RDMA/mlx5: Split mlx5_ib_update_xlt() into ODP and non-ODP cases
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 26 Oct 2020 13:23:13 +0000 (15:23 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 2 Nov 2020 19:10:50 +0000 (15:10 -0400)
commitf1eaac37da20823816af274d69a9eed7444e9822
tree2668cc7af653d5eb8b5e92cfa0141d6c736a68a6
parent8010d74b9965b33182651767e9788ed84cf8e5f9
RDMA/mlx5: Split mlx5_ib_update_xlt() into ODP and non-ODP cases

Mixing these together is just a mess, make a dedicated version,
mlx5_ib_update_mr_pas(), which directly loads the whole MTT for a non-ODP
MR.

The split out version can trivially use a simple loop with
rdma_for_each_block() which allows using the core code to compute the MR
pages and avoids seeking in the SGL list after each chunk as the
__mlx5_ib_populate_pas() call required.

Significantly speeds loading large MTTs.

Link: https://lore.kernel.org/r/20201026132314.1336717-5-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/mem.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c