]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/irdma: Reduce iWARP QP destroy time
authorShiraz Saleem <shiraz.saleem@intel.com>
Mon, 25 Apr 2022 18:17:02 +0000 (13:17 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 2 May 2022 14:10:33 +0000 (11:10 -0300)
commitaae1c2ee6452de2284931b5b8a54048d79540f5e
tree85c7791af81a3ef750e882b65558a40dd008f3aa
parent29bf92fa611ea82b30f95ecce1355367be2d03e6
RDMA/irdma: Reduce iWARP QP destroy time

QP destroy is synchronous and waits for its refcnt to be decremented in
irdma_cm_node_free_cb (for iWARP) which fires after the RCU grace period
elapses.

Applications running a large number of connections are exposed to high
wait times on destroy QP for events like SIGABORT.

The long pole for this wait time is the firing of the call_rcu callback
during a CM node destroy which can be slow. It holds the QP reference
count and blocks the destroy QP from completing.

call_rcu only needs to make sure that list walkers have a reference to the
cm_node object before freeing it and thus need to wait for grace period
elapse. The rest of the connection teardown in irdma_cm_node_free_cb is
moved out of the grace period wait in irdma_destroy_connection. Also,
replace call_rcu with a simple kfree_rcu as it just needs to do a kfree on
the cm_node

Fixes: 649875a7f60b ("RDMA/irdma: Add connection manager")
Link: https://lore.kernel.org/r/20220425181703.1634-3-shiraz.saleem@intel.com
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/irdma/cm.c