RDMA/mlx5: Avoid double lookups on the pagefault path
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 9 Oct 2019 16:09:31 +0000 (13:09 -0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 28 Oct 2019 19:41:14 +0000 (16:41 -0300)
commitb70d785d237c0d3e4235c511f38f8ce64620f945
tree67b239743d643a9ce5b5d45cdbd1018f7dcb38bd
parent3389baa831b6a09e3c96e2a6283a1b952be2f0cd
RDMA/mlx5: Avoid double lookups on the pagefault path

Now that the locking is simplified combine pagefault_implicit_mr() with
implicit_mr_get_data() so that we sweep over the idx range only once,
and do the single xlt update at the end, after the child umems are
setup.

This avoids double iteration/xa_loads plus the sketchy failure path if the
xa_load() fails.

Link: https://lore.kernel.org/r/20191009160934.3143-12-jgg@ziepe.ca
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/odp.c