Skip to contentSkip to conversation

follow-up to "Decouple req recycling"

PATCH In review Chuck Lever 2 participants 4 messages Jun 1

Subsystems (4)
lore
Share & tools
lore

Chuck Lever

author maintainer
#0 lore raw

cover follow-up to "Decouple req recycling"

From: Chuck Lever <[email protected]>

Here are a couple of trivial fixes to the recent "xprtrdma: Decouple req recycling from RPC completion" series.

Chuck Lever (2):
xprtrdma: Fix I3 invariant comment in rpcrdma_complete_rqst
xprtrdma: Remove tautological I2 assertion in rpcrdma_reply_put

 net/sunrpc/xprtrdma/rpc_rdma.c | 4 ++--
 net/sunrpc/xprtrdma/verbs.c    | 4 ----
 2 files changed, 2 insertions(+), 6 deletions(-)
Signature · 1 line
2.54.0
author maintainer
#1 lore raw

PATCH 1/2 xprtrdma: Fix I3 invariant comment in rpcrdma_complete_rqst

From: Chuck Lever <[email protected]>

frwr_unmap_sync() and frwr_unmap_async() drain rl_registered via rpcrdma_mr_pop() before posting invalidation Work Requests to hardware. The WARN_ON_ONCE verifies that the list-drain step has occurred, not that hardware unmapping has completed.

Reword the comment to match what the assertion actually checks.

---
 net/sunrpc/xprtrdma/rpc_rdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/sunrpc/xprtrdma/rpc_rdma.c +2 -2
index 626cadec4555..f115baba6d56 100644
@@ -1336,8 +1336,8 @@ void rpcrdma_complete_rqst(struct rpcrdma_rep *rep)
 	struct rpc_rqst *rqst = rep->rr_rqst;
 	int status;
 
-	/* I3: every registered MR has been invalidated and
-	 * ib_dma_unmap_sg()'d before complete_rqst runs.
+	/* I3: rl_registered has been drained by frwr_unmap before
+	 * complete_rqst runs.
 	 */
 	WARN_ON_ONCE(!list_empty(&rpcr_to_rdmar(rqst)->rl_registered));
 
Signature · 1 line
2.54.0
author maintainer
#2 lore raw

PATCH 2/2 xprtrdma: Remove tautological I2 assertion in rpcrdma_reply_put

In reply to Chuck Lever

From: Chuck Lever <[email protected]>

rpcrdma_reply_put() sets req->rl_reply to NULL when it is non-NULL, and skips the block when it is already NULL. The WARN_ON_ONCE(req->rl_reply) that follows can never fire because both paths leave rl_reply NULL.

Remove the dead assertion and its comment.

---
 net/sunrpc/xprtrdma/verbs.c | 4 ----
 1 file changed, 4 deletions(-)
net/sunrpc/xprtrdma/verbs.c +0 -4
index da2c6fa44154..92c691d2521f 100644
@@ -1259,10 +1259,6 @@ void rpcrdma_reply_put(struct rpcrdma_buffer *buffers, struct rpcrdma_req *req)
 		req->rl_reply = NULL;
 		rpcrdma_rep_put(buffers, rep);
 	}
-	/* I2: rl_reply NULL after the put closes the
-	 * 'rep on rb_free_reps still referenced by req' window.
-	 */
-	WARN_ON_ONCE(req->rl_reply);
 }
 
 /**
Signature · 1 line
2.54.0
maintainer
#3 lore raw
In reply to Chuck Lever

Hi Chuck,

Quoted 4 lines · Chuck Lever

From: Chuck Lever <[email protected]>

Here are a couple of trivial fixes to the recent "xprtrdma: Decouple req recycling from RPC completion" series.

Thanks for the extra fixes! I've added them to my testing branch which should be pushed out by the end of the day.

Anna

Quoted 11 lines

Chuck Lever (2):
xprtrdma: Fix I3 invariant comment in rpcrdma_complete_rqst
xprtrdma: Remove tautological I2 assertion in rpcrdma_reply_put

 net/sunrpc/xprtrdma/rpc_rdma.c | 4 ++--
 net/sunrpc/xprtrdma/verbs.c    | 4 ----
 2 files changed, 2 insertions(+), 6 deletions(-)
Signature · 1 line
2.54.0