follow-up to "Decouple req recycling"
Subsystems (4)
Chuck Lever
maintainercover 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
Chuck Lever
maintainerPATCH 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
@@ -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
Chuck Lever
maintainerPATCH 2/2 xprtrdma: Remove tautological I2 assertion in rpcrdma_reply_put
In reply to Chuck LeverFrom: 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
@@ -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
Anna Schumaker
maintainerHi 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 inrpcrdma_complete_rqst
xprtrdma: Remove tautological I2 assertion inrpcrdma_reply_putnet/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