summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-10-09 19:09:30 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-10-28 22:41:14 +0300
commit3389baa831b6a09e3c96e2a6283a1b952be2f0cd (patch)
tree841feb907161e0aa96df8066ddb96d3d8e063609 /include
parent423f52d65005e8f5067d94bd4f41d8a7d8388135 (diff)
downloadlinux-3389baa831b6a09e3c96e2a6283a1b952be2f0cd.tar.xz
RDMA/mlx5: Reduce locking in implicit_mr_get_data()
Now that the child MRs are stored in an xarray we can rely on the SRCU lock to protect the xa_load and use xa_cmpxchg on the slow allocation path to resolve races with concurrent page fault. This reduces the scope of the critical section of umem_mutex for implicit MRs to only cover mlx5_ib_update_xlt, and avoids taking a lock at all if the child MR is already in the xarray. This makes it consistent with the normal ODP MR critical section for umem_lock, and the locking approach used for destroying an unusued implicit child MR. The MLX5_IB_UPD_XLT_ATOMIC is no longer needed in implicit_get_child_mr() since it is no longer called with any locks. Link: https://lore.kernel.org/r/20191009160934.3143-11-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions