Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH 0/2] follow-up to "Decouple req recycling"
@ 2026-06-01 17:54 Chuck Lever
  2026-06-01 17:54 ` [PATCH 1/2] xprtrdma: Fix I3 invariant comment in rpcrdma_complete_rqst Chuck Lever
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chuck Lever @ 2026-06-01 17:54 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs, linux-rdma, Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

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(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] xprtrdma: Fix I3 invariant comment in rpcrdma_complete_rqst
  2026-06-01 17:54 [PATCH 0/2] follow-up to "Decouple req recycling" Chuck Lever
@ 2026-06-01 17:54 ` Chuck Lever
  2026-06-01 17:54 ` [PATCH 2/2] xprtrdma: Remove tautological I2 assertion in rpcrdma_reply_put Chuck Lever
  2026-06-01 19:37 ` [PATCH 0/2] follow-up to "Decouple req recycling" Anna Schumaker
  2 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2026-06-01 17:54 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs, linux-rdma, Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

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.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 net/sunrpc/xprtrdma/rpc_rdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 626cadec4555..f115baba6d56 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -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));
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] xprtrdma: Remove tautological I2 assertion in rpcrdma_reply_put
  2026-06-01 17:54 [PATCH 0/2] follow-up to "Decouple req recycling" Chuck Lever
  2026-06-01 17:54 ` [PATCH 1/2] xprtrdma: Fix I3 invariant comment in rpcrdma_complete_rqst Chuck Lever
@ 2026-06-01 17:54 ` Chuck Lever
  2026-06-01 19:37 ` [PATCH 0/2] follow-up to "Decouple req recycling" Anna Schumaker
  2 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2026-06-01 17:54 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs, linux-rdma, Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

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.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 net/sunrpc/xprtrdma/verbs.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index da2c6fa44154..92c691d2521f 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -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);
 }
 
 /**
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] follow-up to "Decouple req recycling"
  2026-06-01 17:54 [PATCH 0/2] follow-up to "Decouple req recycling" Chuck Lever
  2026-06-01 17:54 ` [PATCH 1/2] xprtrdma: Fix I3 invariant comment in rpcrdma_complete_rqst Chuck Lever
  2026-06-01 17:54 ` [PATCH 2/2] xprtrdma: Remove tautological I2 assertion in rpcrdma_reply_put Chuck Lever
@ 2026-06-01 19:37 ` Anna Schumaker
  2 siblings, 0 replies; 4+ messages in thread
From: Anna Schumaker @ 2026-06-01 19:37 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-nfs, linux-rdma, Chuck Lever

Hi Chuck,

On Mon, Jun 1, 2026, at 1:54 PM, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> 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

>
> 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(-)
>
> -- 
> 2.54.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-01 19:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 17:54 [PATCH 0/2] follow-up to "Decouple req recycling" Chuck Lever
2026-06-01 17:54 ` [PATCH 1/2] xprtrdma: Fix I3 invariant comment in rpcrdma_complete_rqst Chuck Lever
2026-06-01 17:54 ` [PATCH 2/2] xprtrdma: Remove tautological I2 assertion in rpcrdma_reply_put Chuck Lever
2026-06-01 19:37 ` [PATCH 0/2] follow-up to "Decouple req recycling" Anna Schumaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox