All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Anna Schumaker <anna.schumaker@netapp.com>
Cc: dan@kernelim.com,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH RFC] xprtrdma: Release in-flight MRs on disconnect
Date: Mon, 17 Aug 2020 13:34:51 -0400	[thread overview]
Message-ID: <8836EE99-C971-434A-B4A4-C1C4241073BC@oracle.com> (raw)
In-Reply-To: <159767751439.190071.13659900216337230912.stgit@manet.1015granger.net>


> 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




      parent reply	other threads:[~2020-08-17 17:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8836EE99-C971-434A-B4A4-C1C4241073BC@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=anna.schumaker@netapp.com \
    --cc=dan@kernelim.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.