linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anna Schumaker <Anna.Schumaker@netapp.com>
To: Chuck Lever <chuck.lever@oracle.com>,
	<linux-rdma@vger.kernel.org>, <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v2 02/16] xprtrdma: Warn when there are orphaned IB objects
Date: Tue, 12 May 2015 14:12:29 -0400	[thread overview]
Message-ID: <5552428D.7010907@Netapp.com> (raw)
In-Reply-To: <20150511180235.31263.71754.stgit@manet.1015granger.net>

Hi Chuck,

On 05/11/2015 02:02 PM, Chuck Lever wrote:
> WARN during transport destruction if ib_dealloc_pd() fails. This is
> a sign that xprtrdma orphaned one or more RDMA API objects at some
> point, which can pin lower layer kernel modules and cause shutdown
> to hang.

I'm curious, what would cause an RDMA object to get orphaned in the first place?  Is there any way to prevent that?

Anna

> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> Reviewed-by: Steve Wise <swise@opengridcomputing.com>
> Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
> Reviewed-by: Devesh Sharma <devesh.sharma@avagotech.com>
> ---
>  net/sunrpc/xprtrdma/verbs.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
> index 4870d27..51900e6 100644
> --- a/net/sunrpc/xprtrdma/verbs.c
> +++ b/net/sunrpc/xprtrdma/verbs.c
> @@ -702,17 +702,17 @@ rpcrdma_ia_close(struct rpcrdma_ia *ia)
>  		dprintk("RPC:       %s: ib_dereg_mr returned %i\n",
>  			__func__, rc);
>  	}
> +
>  	if (ia->ri_id != NULL && !IS_ERR(ia->ri_id)) {
>  		if (ia->ri_id->qp)
>  			rdma_destroy_qp(ia->ri_id);
>  		rdma_destroy_id(ia->ri_id);
>  		ia->ri_id = NULL;
>  	}
> -	if (ia->ri_pd != NULL && !IS_ERR(ia->ri_pd)) {
> -		rc = ib_dealloc_pd(ia->ri_pd);
> -		dprintk("RPC:       %s: ib_dealloc_pd returned %i\n",
> -			__func__, rc);
> -	}
> +
> +	/* If the pd is still busy, xprtrdma missed freeing a resource */
> +	if (ia->ri_pd && !IS_ERR(ia->ri_pd))
> +		WARN_ON(ib_dealloc_pd(ia->ri_pd));
>  }
>  
>  /*
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2015-05-12 18:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 18:02 [PATCH v2 00/16] NFS/RDMA patches proposed for 4.2 Chuck Lever
2015-05-11 18:02 ` [PATCH v2 01/16] SUNRPC: Transport fault injection Chuck Lever
2015-05-11 18:02 ` [PATCH v2 02/16] xprtrdma: Warn when there are orphaned IB objects Chuck Lever
2015-05-12 18:12   ` Anna Schumaker [this message]
2015-05-12 18:20     ` Chuck Lever
2015-05-12 18:12   ` Anna Schumaker
2015-05-12 18:14   ` Anna Schumaker
2015-05-11 18:02 ` [PATCH v2 03/16] xprtrdma: Replace rpcrdma_rep::rr_buffer with rr_rxprt Chuck Lever
2015-05-11 18:02 ` [PATCH v2 04/16] xprtrdma: Remove rr_func Chuck Lever
2015-05-11 18:03 ` [PATCH v2 05/16] xprtrdma: Use ib_device pointer safely Chuck Lever
2015-05-11 18:03 ` [PATCH v2 06/16] xprtrdma: Introduce helpers for allocating MWs Chuck Lever
2015-05-11 18:03 ` [PATCH v2 07/16] xprtrdma: Acquire FMRs in rpcrdma_fmr_register_external() Chuck Lever
2015-05-11 18:03 ` [PATCH v2 08/16] xprtrdma: Introduce an FRMR recovery workqueue Chuck Lever
2015-05-11 18:03 ` [PATCH v2 09/16] xprtrdma: Acquire MRs in rpcrdma_register_external() Chuck Lever
2015-05-11 18:03 ` [PATCH v2 10/16] xprtrdma: Remove unused LOCAL_INV recovery logic Chuck Lever
2015-05-11 18:04 ` [PATCH v2 11/16] xprtrdma: Remove ->ro_reset Chuck Lever
2015-05-11 18:04 ` [PATCH v2 12/16] xprtrdma: Remove rpcrdma_ia::ri_memreg_strategy Chuck Lever
2015-05-11 18:04 ` [PATCH v2 13/16] xprtrdma: Split rb_lock Chuck Lever
2015-05-11 18:04 ` [PATCH v2 14/16] xprtrdma: Stack relief in fmr_op_map() Chuck Lever
2015-05-11 18:04 ` [PATCH v2 15/16] xprtrdma: Reduce per-transport MR allocation Chuck Lever
2015-05-11 18:04 ` [PATCH v2 16/16] SUNRPC: Clean up bc_send() Chuck Lever
2015-05-20 17:51 ` [PATCH v2 00/16] NFS/RDMA patches proposed for 4.2 Devesh Sharma
2015-05-26 15:28 ` Doug Ledford
2015-05-26 15:37   ` Chuck Lever

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=5552428D.7010907@Netapp.com \
    --to=anna.schumaker@netapp.com \
    --cc=chuck.lever@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).