Skip to content

Cleanup locking and events in ucma

Leon Romanovsky linux-rdma lkml 1 version Applied

Status from this message: Applied to for-next

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14RDMA/ucma: Fix refcount 0 incr in ucma_get_ctx()drivers/infiniband/core/ucma.c+2 -20 replies
2/14RDMA/ucma: Remove unnecessary locking of file->ctx_list in closedrivers/infiniband/core/ucma.c+7 -40 replies
3/14RDMA/ucma: Consolidate the two destroy flowsdrivers/infiniband/core/ucma.c+22 -420 replies
4/14RDMA/ucma: Fix error cases around ucma_alloc_ctx()drivers/infiniband/core/ucma.c+42 -260 replies
5/14RDMA/ucma: Remove mc_list and rely on xarraydrivers/infiniband/core/ucma.c+22 -370 replies
6/14RDMA/cma: Add missing locking to rdma_accept()drivers/infiniband/core/cma.c drivers/infiniband/core/ucma.c include/rdma/rdma_cm.h+35 -72 replies
7/14RDMA/ucma: Do not use file->mut to lock destroyingdrivers/infiniband/core/ucma.c+11 -30 replies
8/14RDMA/ucma: Fix the locking of ctx->filedrivers/infiniband/core/ucma.c+5 -10 replies
9/14RDMA/ucma: Fix locking for ctx->events_reporteddrivers/infiniband/core/ucma.c+3 -10 replies
10/14RDMA/ucma: Add missing locking around rdma_leave_multicast()drivers/infiniband/core/ucma.c+2 -00 replies
11/14RDMA/ucma: Change backlog into an atomicdrivers/infiniband/core/ucma.c+8 -70 replies
12/14RDMA/ucma: Narrow file->mut in ucma_event_handler()drivers/infiniband/core/ucma.c+7 -90 replies
13/14RDMA/ucma: Rework how new connections are passed through event deliverydrivers/infiniband/core/ucma.c+96 -1260 replies
14/14RDMA/ucma: Remove closing and the close_wqdrivers/infiniband/core/ucma.c+15 -340 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH rdma-next 00/14] Cleanup locking and events in ucma

From: Leon Romanovsky <[email protected]>

From Jason:

Rework how the uevents for new connections are handled so all the locking ends up simpler and a work queue can be removed. This should also speed up destruction of ucma_context's as a flush_workqueue() was replaced with cancel_work_sync().

The simpler locking comes from narrowing what file->mut covers and moving other data to other locks, particularly by injecting the handler_mutex from the RDMA CM core as a construct available to ULPs. The handler_mutex directly prevents handlers from running without creating any ABBA locking problems.

Fix various error cases and data races caused by missing locking.

Thanks

Jason Gunthorpe (14):
RDMA/ucma: Fix refcount 0 incr in ucma_get_ctx() RDMA/ucma: Remove unnecessary locking of file->ctx_list in close RDMA/ucma: Consolidate the two destroy flows RDMA/ucma: Fix error cases around ucma_alloc_ctx() RDMA/ucma: Remove mc_list and rely on xarray RDMA/cma: Add missing locking to rdma_accept() RDMA/ucma: Do not use file->mut to lock destroying RDMA/ucma: Fix the locking of ctx->file
RDMA/ucma: Fix locking for ctx->events_reported RDMA/ucma: Add missing locking around rdma_leave_multicast() RDMA/ucma: Change backlog into an atomic
RDMA/ucma: Narrow file->mut in ucma_event_handler() RDMA/ucma: Rework how new connections are passed through event
delivery
RDMA/ucma: Remove closing and the close_wq

 drivers/infiniband/core/cma.c  |  25 +-
 drivers/infiniband/core/ucma.c | 444 +++++++++++++++------------------
 include/rdma/rdma_cm.h         |   5 +
 3 files changed, 226 insertions(+), 248 deletions(-)

--
2.26.2