* [PATCH RFC] xprtrdma: Release in-flight MRs on disconnect
@ 2020-08-17 15:19 Chuck Lever
2020-08-17 16:09 ` Dan Aloni
2020-08-17 17:34 ` Chuck Lever
0 siblings, 2 replies; 3+ messages in thread
From: Chuck Lever @ 2020-08-17 15:19 UTC (permalink / raw)
To: dan; +Cc: linux-nfs, linux-rdma
Dan Aloni reports that when a server disconnects abruptly, a few
memory regions are left DMA mapped. Over time this leak could pin
enough I/O resources to slow or even deadlock an NFS/RDMA client.
I found that if a transport disconnects before pending Send and
FastReg WRs can be posted, the to-be-registered MRs are stranded on
the req's rl_registered list and never released -- since they
weren't posted, there's no Send completion to DMA unmap them.
Reported-by: Dan Aloni <dan@kernelim.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
net/sunrpc/xprtrdma/verbs.c | 2 ++
1 file changed, 2 insertions(+)
Hi Dan, does this help?
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 95c66a339e34..53962e41896d 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -936,6 +936,8 @@ static void rpcrdma_req_reset(struct rpcrdma_req *req)
rpcrdma_regbuf_dma_unmap(req->rl_sendbuf);
rpcrdma_regbuf_dma_unmap(req->rl_recvbuf);
+
+ frwr_reset(req);
}
/* ASSUMPTION: the rb_allreqs list is stable for the duration,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RFC] xprtrdma: Release in-flight MRs on disconnect
2020-08-17 15:19 [PATCH RFC] xprtrdma: Release in-flight MRs on disconnect Chuck Lever
@ 2020-08-17 16:09 ` Dan Aloni
2020-08-17 17:34 ` Chuck Lever
1 sibling, 0 replies; 3+ messages in thread
From: Dan Aloni @ 2020-08-17 16:09 UTC (permalink / raw)
To: Chuck Lever; +Cc: linux-nfs, linux-rdma
On Mon, Aug 17, 2020 at 11:19:26AM -0400, Chuck Lever wrote:
> Dan Aloni reports that when a server disconnects abruptly, a few
> memory regions are left DMA mapped. Over time this leak could pin
> enough I/O resources to slow or even deadlock an NFS/RDMA client.
>
> I found that if a transport disconnects before pending Send and
> FastReg WRs can be posted, the to-be-registered MRs are stranded on
> the req's rl_registered list and never released -- since they
> weren't posted, there's no Send completion to DMA unmap them.
>
> Reported-by: Dan Aloni <dan@kernelim.com>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> net/sunrpc/xprtrdma/verbs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> Hi Dan, does this help?
Yeah, works as expected with your fix.
Thanks!
--
Dan Aloni
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFC] xprtrdma: Release in-flight MRs on disconnect
2020-08-17 15:19 [PATCH RFC] xprtrdma: Release in-flight MRs on disconnect Chuck Lever
2020-08-17 16:09 ` Dan Aloni
@ 2020-08-17 17:34 ` Chuck Lever
1 sibling, 0 replies; 3+ messages in thread
From: Chuck Lever @ 2020-08-17 17:34 UTC (permalink / raw)
To: Anna Schumaker; +Cc: dan, Linux NFS Mailing List, linux-rdma
> On Aug 17, 2020, at 11:19 AM, Chuck Lever <chuck.lever@oracle.com> wrote:
>
> Dan Aloni reports that when a server disconnects abruptly, a few
> memory regions are left DMA mapped. Over time this leak could pin
> enough I/O resources to slow or even deadlock an NFS/RDMA client.
>
> I found that if a transport disconnects before pending Send and
> FastReg WRs can be posted, the to-be-registered MRs are stranded on
> the req's rl_registered list and never released -- since they
> weren't posted, there's no Send completion to DMA unmap them.
>
> Reported-by: Dan Aloni <dan@kernelim.com>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> net/sunrpc/xprtrdma/verbs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> Hi Dan, does this help?
Hi Anna, can you grab this for v5.9-rc ?
> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
> index 95c66a339e34..53962e41896d 100644
> --- a/net/sunrpc/xprtrdma/verbs.c
> +++ b/net/sunrpc/xprtrdma/verbs.c
> @@ -936,6 +936,8 @@ static void rpcrdma_req_reset(struct rpcrdma_req *req)
>
> rpcrdma_regbuf_dma_unmap(req->rl_sendbuf);
> rpcrdma_regbuf_dma_unmap(req->rl_recvbuf);
> +
> + frwr_reset(req);
> }
>
> /* ASSUMPTION: the rb_allreqs list is stable for the duration,
>
>
--
Chuck Lever
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-17 19:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 15:19 [PATCH RFC] xprtrdma: Release in-flight MRs on disconnect Chuck Lever
2020-08-17 16:09 ` Dan Aloni
2020-08-17 17:34 ` Chuck Lever
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.