Commit 2df6d89
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: 146b975 ("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>1 parent 7b8943b commit 2df6d89
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2308 | 2308 | | |
2309 | 2309 | | |
2310 | 2310 | | |
2311 | | - | |
| 2311 | + | |
2312 | 2312 | | |
2313 | | - | |
2314 | | - | |
2315 | 2313 | | |
2316 | 2314 | | |
2317 | 2315 | | |
| |||
2359 | 2357 | | |
2360 | 2358 | | |
2361 | 2359 | | |
2362 | | - | |
2363 | 2360 | | |
2364 | 2361 | | |
2365 | 2362 | | |
| |||
2387 | 2384 | | |
2388 | 2385 | | |
2389 | 2386 | | |
2390 | | - | |
2391 | | - | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
2392 | 2390 | | |
2393 | 2391 | | |
2394 | 2392 | | |
| |||
0 commit comments