linux_dsm_epyc7002/drivers/infiniband/hw/mlx5
Jason Gunthorpe 3389baa831 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>
2019-10-28 16:41:14 -03:00
..
ah.c RDMA: Handle AH allocations by IB/core 2019-04-08 13:05:25 -03:00
cmd.c net/mlx5: Move device memory management to mlx5_core 2019-09-01 23:44:41 -07:00
cmd.h net/mlx5: Move device memory management to mlx5_core 2019-09-01 23:44:41 -07:00
cong.c infiniband: mlx5: no need to check return value of debugfs_create functions 2019-01-24 09:22:29 -07:00
cq.c RDMA/mlx5: Split sig_err MR data into its own xarray 2019-10-28 16:41:13 -03:00
devx.c RDMA/mlx5: Use a dedicated mkey xarray for ODP 2019-10-28 16:41:13 -03:00
doorbell.c IB/{core,hw}: Have ib_umem_get extract the ib_ucontext from ib_udata 2019-01-10 17:07:45 -07:00
flow.c RDMA subsystem updates for 5.4 2019-09-21 10:26:24 -07:00
gsi.c RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv() arguments const 2018-07-30 20:09:34 -06:00
ib_rep.c Merge mlx5-next into rdma for-next 2019-07-05 10:16:19 -03:00
ib_rep.h Merge mlx5-next into rdma for-next 2019-07-03 16:50:26 -03:00
ib_virt.c IB/mlx5: Restore IB guid/policy for virtual functions 2017-07-24 10:34:28 -04:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mad.c IB/mlx5: Fixed reporting counters on 2nd port for Dual port RoCE 2019-07-03 15:08:54 -03:00
main.c RDMA/mlx5: Use a dedicated mkey xarray for ODP 2019-10-28 16:41:13 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mem.c RDMA/odp: Split creating a umem_odp from ib_umem_get 2019-08-21 14:08:42 -03:00
mlx5_ib.h RDMA/mlx5: Use an xarray for the children of an implicit ODP 2019-10-28 16:41:14 -03:00
mr.c RDMA/mlx5: Delete struct mlx5_priv->mkey_table 2019-10-28 16:41:13 -03:00
odp.c RDMA/mlx5: Reduce locking in implicit_mr_get_data() 2019-10-28 16:41:14 -03:00
qp.c Merge tag 'v5.3-rc8' into rdma.git for-next 2019-09-13 16:59:51 -03:00
srq_cmd.c mlx5: Use refcount_t for refcount 2019-08-07 11:01:48 -07:00
srq.c RDMA: Handle SRQ allocations by IB/core 2019-04-08 13:05:25 -03:00
srq.h RDMA: Handle SRQ allocations by IB/core 2019-04-08 13:05:25 -03:00