diff mbox

[v1,05/13] xprtrdma: Don't drain CQs on transport disconnect

Message ID 20140623223942.1634.89063.stgit@manet.1015granger.net (mailing list archive)
State Not Applicable
Headers show

Commit Message

Chuck Lever June 23, 2014, 10:39 p.m. UTC
CQs are not destroyed until unmount. By draining CQs on transport
disconnect, successful completions that can change the r.frmr.state
field can be missed.

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


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Devesh Sharma July 2, 2014, 7:06 p.m. UTC | #1
This change is very much prone to generate poll_cq errors because of un-cleaned completions which still
point to the non-existent QPs. On the new connection when these completions are polled, the poll_cq will
fail because old QP pointer is already NULL. 
Did anyone hit this situation during their testing?

> -----Original Message-----

> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-

> owner@vger.kernel.org] On Behalf Of Chuck Lever

> Sent: Tuesday, June 24, 2014 4:10 AM

> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org

> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport disconnect

> 

> CQs are not destroyed until unmount. By draining CQs on transport

> disconnect, successful completions that can change the r.frmr.state field can

> be missed.

> 

> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

> ---

>  net/sunrpc/xprtrdma/verbs.c |    5 -----

>  1 file changed, 5 deletions(-)

> 

> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c

> index 3c7f904..451e100 100644

> --- a/net/sunrpc/xprtrdma/verbs.c

> +++ b/net/sunrpc/xprtrdma/verbs.c

> @@ -873,9 +873,6 @@ retry:

>  			dprintk("RPC:       %s: rpcrdma_ep_disconnect"

>  				" status %i\n", __func__, rc);

> 

> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);

> -

>  		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);

>  		id = rpcrdma_create_id(xprt, ia,

>  				(struct sockaddr *)&xprt->rx_data.addr);

> @@ -985,8 +982,6 @@ rpcrdma_ep_disconnect(struct rpcrdma_ep *ep,

> struct rpcrdma_ia *ia)  {

>  	int rc;

> 

> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);

>  	rc = rdma_disconnect(ia->ri_id);

>  	if (!rc) {

>  		/* returns without wait if not connected */

> 

> --

> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the

> body of a message to majordomo@vger.kernel.org More majordomo info at

> http://vger.kernel.org/majordomo-info.html
Steve Wise July 2, 2014, 7:28 p.m. UTC | #2
On 7/2/2014 2:06 PM, Devesh Sharma wrote:
> This change is very much prone to generate poll_cq errors because of un-cleaned completions which still
> point to the non-existent QPs. On the new connection when these completions are polled, the poll_cq will
> fail because old QP pointer is already NULL.
> Did anyone hit this situation during their testing?

Hey Devesh,

iw_cxgb4 will silently toss CQEs if the QP is not active.


>> -----Original Message-----
>> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
>> owner@vger.kernel.org] On Behalf Of Chuck Lever
>> Sent: Tuesday, June 24, 2014 4:10 AM
>> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org
>> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport disconnect
>>
>> CQs are not destroyed until unmount. By draining CQs on transport
>> disconnect, successful completions that can change the r.frmr.state field can
>> be missed.
>>
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> ---
>>   net/sunrpc/xprtrdma/verbs.c |    5 -----
>>   1 file changed, 5 deletions(-)
>>
>> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
>> index 3c7f904..451e100 100644
>> --- a/net/sunrpc/xprtrdma/verbs.c
>> +++ b/net/sunrpc/xprtrdma/verbs.c
>> @@ -873,9 +873,6 @@ retry:
>>   			dprintk("RPC:       %s: rpcrdma_ep_disconnect"
>>   				" status %i\n", __func__, rc);
>>
>> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);
>> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);
>> -
>>   		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);
>>   		id = rpcrdma_create_id(xprt, ia,
>>   				(struct sockaddr *)&xprt->rx_data.addr);
>> @@ -985,8 +982,6 @@ rpcrdma_ep_disconnect(struct rpcrdma_ep *ep,
>> struct rpcrdma_ia *ia)  {
>>   	int rc;
>>
>> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);
>> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);
>>   	rc = rdma_disconnect(ia->ri_id);
>>   	if (!rc) {
>>   		/* returns without wait if not connected */
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the
>> body of a message to majordomo@vger.kernel.org More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
> N?????r??y???b?X???v?^?)?{.n?+????{???"??^n?r???z???h????&???G???h?(????j"???m?????z?????f???h???~?mml==

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chuck Lever July 2, 2014, 7:40 p.m. UTC | #3
On Jul 2, 2014, at 3:28 PM, Steve Wise <swise@opengridcomputing.com> wrote:

> On 7/2/2014 2:06 PM, Devesh Sharma wrote:
>> This change is very much prone to generate poll_cq errors because of un-cleaned completions which still
>> point to the non-existent QPs. On the new connection when these completions are polled, the poll_cq will
>> fail because old QP pointer is already NULL.
>> Did anyone hit this situation during their testing?

I tested this aggressively with a fault injector that triggers regular connection
disruption.

> Hey Devesh,
> 
> iw_cxgb4 will silently toss CQEs if the QP is not active.

xprtrdma relies on getting a completion (either successful or in error) for every
WR it has posted. The goal of this patch is to avoid throwing away queued
completions after a transport disconnect so we don't lose track of FRMR rkey
updates (FAST_REG_MR and LOCAL_INV completions) and we can capture all RPC
replies posted before the connection was lost.

Sounds like we also need to keep the QP around, even in error state, until all
known WRs on that QP have completed?


> 
> 
>>> -----Original Message-----
>>> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
>>> owner@vger.kernel.org] On Behalf Of Chuck Lever
>>> Sent: Tuesday, June 24, 2014 4:10 AM
>>> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org
>>> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport disconnect
>>> 
>>> CQs are not destroyed until unmount. By draining CQs on transport
>>> disconnect, successful completions that can change the r.frmr.state field can
>>> be missed.
>>> 
>>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>>> ---
>>>  net/sunrpc/xprtrdma/verbs.c |    5 -----
>>>  1 file changed, 5 deletions(-)
>>> 
>>> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
>>> index 3c7f904..451e100 100644
>>> --- a/net/sunrpc/xprtrdma/verbs.c
>>> +++ b/net/sunrpc/xprtrdma/verbs.c
>>> @@ -873,9 +873,6 @@ retry:
>>>  			dprintk("RPC:       %s: rpcrdma_ep_disconnect"
>>>  				" status %i\n", __func__, rc);
>>> 
>>> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);
>>> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);
>>> -
>>>  		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);
>>>  		id = rpcrdma_create_id(xprt, ia,
>>>  				(struct sockaddr *)&xprt->rx_data.addr);
>>> @@ -985,8 +982,6 @@ rpcrdma_ep_disconnect(struct rpcrdma_ep *ep,
>>> struct rpcrdma_ia *ia)  {
>>>  	int rc;
>>> 
>>> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);
>>> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);
>>>  	rc = rdma_disconnect(ia->ri_id);
>>>  	if (!rc) {
>>>  		/* returns without wait if not connected */
>>> 
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the
>>> body of a message to majordomo@vger.kernel.org More majordomo info at
>>> http://vger.kernel.org/majordomo-info.html
>> N?????r??y???b?X???v?^?)?{.n?+????{???"??^n?r???z???h????&???G???h?(????j"???m?????z?????f???h???~?mml==
> 
> --
> 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
Devesh Sharma July 2, 2014, 7:42 p.m. UTC | #4
> -----Original Message-----

> From: Steve Wise [mailto:swise@opengridcomputing.com]

> Sent: Thursday, July 03, 2014 12:59 AM

> To: Devesh Sharma; Chuck Lever; linux-rdma@vger.kernel.org; linux-

> nfs@vger.kernel.org

> Subject: Re: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> disconnect

> 

> On 7/2/2014 2:06 PM, Devesh Sharma wrote:

> > This change is very much prone to generate poll_cq errors because of

> > un-cleaned completions which still point to the non-existent QPs. On

> > the new connection when these completions are polled, the poll_cq will fail

> because old QP pointer is already NULL.

> > Did anyone hit this situation during their testing?

> 

> Hey Devesh,

> 

> iw_cxgb4 will silently toss CQEs if the QP is not active.


Ya, just now checked that in mlx and cxgb4 driver code. On the other hand ocrdma is asserting a BUG-ON for such CQEs causing system panic.
Out of curiosity I am asking, how this change is useful here, is it reducing the re-connection time...Anyhow rpcrdma_clean_cq was discarding the completions (flush/successful both)

> 

> 

> >> -----Original Message-----

> >> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-

> >> owner@vger.kernel.org] On Behalf Of Chuck Lever

> >> Sent: Tuesday, June 24, 2014 4:10 AM

> >> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org

> >> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> >> disconnect

> >>

> >> CQs are not destroyed until unmount. By draining CQs on transport

> >> disconnect, successful completions that can change the r.frmr.state

> >> field can be missed.


Still those are missed isn’t it....Since those successful completions will still be dropped after re-connection. Am I missing something to 
understanding the motivation...

> >>

> >> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

> >> ---

> >>   net/sunrpc/xprtrdma/verbs.c |    5 -----

> >>   1 file changed, 5 deletions(-)

> >>

> >> diff --git a/net/sunrpc/xprtrdma/verbs.c

> >> b/net/sunrpc/xprtrdma/verbs.c index 3c7f904..451e100 100644

> >> --- a/net/sunrpc/xprtrdma/verbs.c

> >> +++ b/net/sunrpc/xprtrdma/verbs.c

> >> @@ -873,9 +873,6 @@ retry:

> >>   			dprintk("RPC:       %s: rpcrdma_ep_disconnect"

> >>   				" status %i\n", __func__, rc);

> >>

> >> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> >> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);

> >> -

> >>   		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);

> >>   		id = rpcrdma_create_id(xprt, ia,

> >>   				(struct sockaddr *)&xprt->rx_data.addr);

> @@ -985,8 +982,6 @@

> >> rpcrdma_ep_disconnect(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia)

> >> {

> >>   	int rc;

> >>

> >> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> >> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);

> >>   	rc = rdma_disconnect(ia->ri_id);

> >>   	if (!rc) {

> >>   		/* returns without wait if not connected */

> >>

> >> --

> >> To unsubscribe from this list: send the line "unsubscribe linux-rdma"

> >> in the body of a message to majordomo@vger.kernel.org More

> majordomo

> >> info at http://vger.kernel.org/majordomo-info.html

> > N     r  y   b X  ?v ^ )?{.n +    {   "  ^n r   z   h    &   G   h 

> > ( ? ?j"   m     z ?   f   h   ~ mml==
Steve Wise July 2, 2014, 7:46 p.m. UTC | #5
> -----Original Message-----
> From: Chuck Lever [mailto:chuck.lever@oracle.com]
> Sent: Wednesday, July 02, 2014 2:40 PM
> To: Steve Wise; Devesh Sharma
> Cc: linux-rdma@vger.kernel.org; Linux NFS Mailing List
> Subject: Re: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport disconnect
> 
> 
> On Jul 2, 2014, at 3:28 PM, Steve Wise <swise@opengridcomputing.com> wrote:
> 
> > On 7/2/2014 2:06 PM, Devesh Sharma wrote:
> >> This change is very much prone to generate poll_cq errors because of un-cleaned
> completions which still
> >> point to the non-existent QPs. On the new connection when these completions are polled,
> the poll_cq will
> >> fail because old QP pointer is already NULL.
> >> Did anyone hit this situation during their testing?
> 
> I tested this aggressively with a fault injector that triggers regular connection
> disruption.
> 
> > Hey Devesh,
> >
> > iw_cxgb4 will silently toss CQEs if the QP is not active.
> 
> xprtrdma relies on getting a completion (either successful or in error) for every
> WR it has posted. The goal of this patch is to avoid throwing away queued
> completions after a transport disconnect so we don't lose track of FRMR rkey
> updates (FAST_REG_MR and LOCAL_INV completions) and we can capture all RPC
> replies posted before the connection was lost.
> 
> Sounds like we also need to keep the QP around, even in error state, until all
> known WRs on that QP have completed?
>

Perhaps.
 
> 
> >
> >
> >>> -----Original Message-----
> >>> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> >>> owner@vger.kernel.org] On Behalf Of Chuck Lever
> >>> Sent: Tuesday, June 24, 2014 4:10 AM
> >>> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org
> >>> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport disconnect
> >>>
> >>> CQs are not destroyed until unmount. By draining CQs on transport
> >>> disconnect, successful completions that can change the r.frmr.state field can
> >>> be missed.
> >>>
> >>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> >>> ---
> >>>  net/sunrpc/xprtrdma/verbs.c |    5 -----
> >>>  1 file changed, 5 deletions(-)
> >>>
> >>> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
> >>> index 3c7f904..451e100 100644
> >>> --- a/net/sunrpc/xprtrdma/verbs.c
> >>> +++ b/net/sunrpc/xprtrdma/verbs.c
> >>> @@ -873,9 +873,6 @@ retry:
> >>>  			dprintk("RPC:       %s: rpcrdma_ep_disconnect"
> >>>  				" status %i\n", __func__, rc);
> >>>
> >>> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);
> >>> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);
> >>> -
> >>>  		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);
> >>>  		id = rpcrdma_create_id(xprt, ia,
> >>>  				(struct sockaddr *)&xprt->rx_data.addr);
> >>> @@ -985,8 +982,6 @@ rpcrdma_ep_disconnect(struct rpcrdma_ep *ep,
> >>> struct rpcrdma_ia *ia)  {
> >>>  	int rc;
> >>>
> >>> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);
> >>> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);
> >>>  	rc = rdma_disconnect(ia->ri_id);
> >>>  	if (!rc) {
> >>>  		/* returns without wait if not connected */
> >>>
> >>> --
> >>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the
> >>> body of a message to majordomo@vger.kernel.org More majordomo info at
> >>> http://vger.kernel.org/majordomo-info.html
> >> N?????r??y???b?X???v?^?)?{.n?+????{???"??^n?r???z???h????&???G???h?(??
> ??j"???m?????z?????f???h???~?mml==
> >
> > --
> > 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
> 
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Devesh Sharma July 2, 2014, 7:48 p.m. UTC | #6
> -----Original Message-----

> From: Steve Wise [mailto:swise@opengridcomputing.com]

> Sent: Thursday, July 03, 2014 1:16 AM

> To: 'Chuck Lever'; Devesh Sharma

> Cc: linux-rdma@vger.kernel.org; 'Linux NFS Mailing List'

> Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> disconnect

> 

> 

> 

> > -----Original Message-----

> > From: Chuck Lever [mailto:chuck.lever@oracle.com]

> > Sent: Wednesday, July 02, 2014 2:40 PM

> > To: Steve Wise; Devesh Sharma

> > Cc: linux-rdma@vger.kernel.org; Linux NFS Mailing List

> > Subject: Re: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > disconnect

> >

> >

> > On Jul 2, 2014, at 3:28 PM, Steve Wise <swise@opengridcomputing.com>

> wrote:

> >

> > > On 7/2/2014 2:06 PM, Devesh Sharma wrote:

> > >> This change is very much prone to generate poll_cq errors because

> > >> of un-cleaned

> > completions which still

> > >> point to the non-existent QPs. On the new connection when these

> > >> completions are polled,

> > the poll_cq will

> > >> fail because old QP pointer is already NULL.

> > >> Did anyone hit this situation during their testing?

> >

> > I tested this aggressively with a fault injector that triggers regular

> > connection disruption.

> >

> > > Hey Devesh,

> > >

> > > iw_cxgb4 will silently toss CQEs if the QP is not active.

> >

> > xprtrdma relies on getting a completion (either successful or in

> > error) for every WR it has posted. The goal of this patch is to avoid

> > throwing away queued completions after a transport disconnect so we

> > don't lose track of FRMR rkey updates (FAST_REG_MR and LOCAL_INV

> > completions) and we can capture all RPC replies posted before the

> connection was lost.

> >

> > Sounds like we also need to keep the QP around, even in error state,

> > until all known WRs on that QP have completed?

> >


Why not poll and process every completion during rpcrdma_cq_cleanup()....

> 

> Perhaps.

> 

> >

> > >

> > >

> > >>> -----Original Message-----

> > >>> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-

> > >>> owner@vger.kernel.org] On Behalf Of Chuck Lever

> > >>> Sent: Tuesday, June 24, 2014 4:10 AM

> > >>> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org

> > >>> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > >>> disconnect

> > >>>

> > >>> CQs are not destroyed until unmount. By draining CQs on transport

> > >>> disconnect, successful completions that can change the

> > >>> r.frmr.state field can be missed.

> > >>>

> > >>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

> > >>> ---

> > >>>  net/sunrpc/xprtrdma/verbs.c |    5 -----

> > >>>  1 file changed, 5 deletions(-)

> > >>>

> > >>> diff --git a/net/sunrpc/xprtrdma/verbs.c

> > >>> b/net/sunrpc/xprtrdma/verbs.c index 3c7f904..451e100 100644

> > >>> --- a/net/sunrpc/xprtrdma/verbs.c

> > >>> +++ b/net/sunrpc/xprtrdma/verbs.c

> > >>> @@ -873,9 +873,6 @@ retry:

> > >>>  			dprintk("RPC:       %s: rpcrdma_ep_disconnect"

> > >>>  				" status %i\n", __func__, rc);

> > >>>

> > >>> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> > >>> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);

> > >>> -

> > >>>  		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);

> > >>>  		id = rpcrdma_create_id(xprt, ia,

> > >>>  				(struct sockaddr *)&xprt->rx_data.addr);

> @@ -985,8 +982,6 @@

> > >>> rpcrdma_ep_disconnect(struct rpcrdma_ep *ep, struct rpcrdma_ia

> > >>> *ia)  {

> > >>>  	int rc;

> > >>>

> > >>> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> > >>> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);

> > >>>  	rc = rdma_disconnect(ia->ri_id);

> > >>>  	if (!rc) {

> > >>>  		/* returns without wait if not connected */

> > >>>

> > >>> --

> > >>> To unsubscribe from this list: send the line "unsubscribe

> > >>> linux-rdma" in the body of a message to majordomo@vger.kernel.org

> > >>> More majordomo info at http://vger.kernel.org/majordomo-info.html

> > >> N     r  y   b X  ?v ^ )?{.n +    {   "  ^n r   z   h    &   G

> > >> h ( ?

> >  ?j"   m     z ?   f   h   ~ mml==

> > >

> > > --

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

> >

> > --

> > Chuck Lever

> > chuck[dot]lever[at]oracle[dot]com

> >

> >

>
Steve Wise July 2, 2014, 7:50 p.m. UTC | #7
> -----Original Message-----
> From: Devesh Sharma [mailto:Devesh.Sharma@Emulex.Com]
> Sent: Wednesday, July 02, 2014 2:43 PM
> To: Steve Wise; Chuck Lever; linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org
> Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport disconnect
> 
> > -----Original Message-----
> > From: Steve Wise [mailto:swise@opengridcomputing.com]
> > Sent: Thursday, July 03, 2014 12:59 AM
> > To: Devesh Sharma; Chuck Lever; linux-rdma@vger.kernel.org; linux-
> > nfs@vger.kernel.org
> > Subject: Re: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport
> > disconnect
> >
> > On 7/2/2014 2:06 PM, Devesh Sharma wrote:
> > > This change is very much prone to generate poll_cq errors because of
> > > un-cleaned completions which still point to the non-existent QPs. On
> > > the new connection when these completions are polled, the poll_cq will fail
> > because old QP pointer is already NULL.
> > > Did anyone hit this situation during their testing?
> >
> > Hey Devesh,
> >
> > iw_cxgb4 will silently toss CQEs if the QP is not active.
> 
> Ya, just now checked that in mlx and cxgb4 driver code. On the other hand ocrdma is asserting
> a BUG-ON for such CQEs causing system panic.
> Out of curiosity I am asking, how this change is useful here, is it reducing the re-connection
> time...Anyhow rpcrdma_clean_cq was discarding the completions (flush/successful both)
>

Well, I don't think there is anything restricting an application from destroying the QP with pending CQEs on its CQs.   So it definitely shouldn't cause a BUG_ON() I think.   I'll have to read up in the Verbs specs if destroying a QP kills all the pending CQEs...

 
> >
> >
> > >> -----Original Message-----
> > >> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> > >> owner@vger.kernel.org] On Behalf Of Chuck Lever
> > >> Sent: Tuesday, June 24, 2014 4:10 AM
> > >> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org
> > >> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport
> > >> disconnect
> > >>
> > >> CQs are not destroyed until unmount. By draining CQs on transport
> > >> disconnect, successful completions that can change the r.frmr.state
> > >> field can be missed.
> 
> Still those are missed isn’t it....Since those successful completions will still be dropped after re-
> connection. Am I missing something to
> understanding the motivation...
> 
> > >>
> > >> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> > >> ---
> > >>   net/sunrpc/xprtrdma/verbs.c |    5 -----
> > >>   1 file changed, 5 deletions(-)
> > >>
> > >> diff --git a/net/sunrpc/xprtrdma/verbs.c
> > >> b/net/sunrpc/xprtrdma/verbs.c index 3c7f904..451e100 100644
> > >> --- a/net/sunrpc/xprtrdma/verbs.c
> > >> +++ b/net/sunrpc/xprtrdma/verbs.c
> > >> @@ -873,9 +873,6 @@ retry:
> > >>   			dprintk("RPC:       %s: rpcrdma_ep_disconnect"
> > >>   				" status %i\n", __func__, rc);
> > >>
> > >> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);
> > >> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);
> > >> -
> > >>   		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);
> > >>   		id = rpcrdma_create_id(xprt, ia,
> > >>   				(struct sockaddr *)&xprt->rx_data.addr);
> > @@ -985,8 +982,6 @@
> > >> rpcrdma_ep_disconnect(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia)
> > >> {
> > >>   	int rc;
> > >>
> > >> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);
> > >> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);
> > >>   	rc = rdma_disconnect(ia->ri_id);
> > >>   	if (!rc) {
> > >>   		/* returns without wait if not connected */
> > >>
> > >> --
> > >> To unsubscribe from this list: send the line "unsubscribe linux-rdma"
> > >> in the body of a message to majordomo@vger.kernel.org More
> > majordomo
> > >> info at http://vger.kernel.org/majordomo-info.html
> > > N     r  y   b X  ?v ^ )?{.n +    {   "  ^n r   z   h    &   G   h 
> > > ( ? ?j"   m     z ?   f   h   ~ mml==


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Devesh Sharma July 2, 2014, 7:53 p.m. UTC | #8
> -----Original Message-----

> From: Steve Wise [mailto:swise@opengridcomputing.com]

> Sent: Thursday, July 03, 2014 1:21 AM

> To: Devesh Sharma; 'Chuck Lever'; linux-rdma@vger.kernel.org; linux-

> nfs@vger.kernel.org

> Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> disconnect

> 

> 

> 

> > -----Original Message-----

> > From: Devesh Sharma [mailto:Devesh.Sharma@Emulex.Com]

> > Sent: Wednesday, July 02, 2014 2:43 PM

> > To: Steve Wise; Chuck Lever; linux-rdma@vger.kernel.org;

> > linux-nfs@vger.kernel.org

> > Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > disconnect

> >

> > > -----Original Message-----

> > > From: Steve Wise [mailto:swise@opengridcomputing.com]

> > > Sent: Thursday, July 03, 2014 12:59 AM

> > > To: Devesh Sharma; Chuck Lever; linux-rdma@vger.kernel.org; linux-

> > > nfs@vger.kernel.org

> > > Subject: Re: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > > disconnect

> > >

> > > On 7/2/2014 2:06 PM, Devesh Sharma wrote:

> > > > This change is very much prone to generate poll_cq errors because

> > > > of un-cleaned completions which still point to the non-existent

> > > > QPs. On the new connection when these completions are polled, the

> > > > poll_cq will fail

> > > because old QP pointer is already NULL.

> > > > Did anyone hit this situation during their testing?

> > >

> > > Hey Devesh,

> > >

> > > iw_cxgb4 will silently toss CQEs if the QP is not active.

> >

> > Ya, just now checked that in mlx and cxgb4 driver code. On the other

> > hand ocrdma is asserting a BUG-ON for such CQEs causing system panic.

> > Out of curiosity I am asking, how this change is useful here, is it

> > reducing the re-connection time...Anyhow rpcrdma_clean_cq was

> > discarding the completions (flush/successful both)

> >

> 

> Well, I don't think there is anything restricting an application from destroying

> the QP with pending CQEs on its CQs.   So it definitely shouldn't cause a

> BUG_ON() I think.   I'll have to read up in the Verbs specs if destroying a QP

> kills all the pending CQEs...


Oh confusion...let me clarify: in ocrdma BUG ON is hit in poll_cq() after re-connection happens and cq is polled again.
Now the first completion in CQ still points to old QP-ID for which ocrdma does not have valid QP pointer.

> 

> 

> > >

> > >

> > > >> -----Original Message-----

> > > >> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-

> > > >> owner@vger.kernel.org] On Behalf Of Chuck Lever

> > > >> Sent: Tuesday, June 24, 2014 4:10 AM

> > > >> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org

> > > >> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > > >> disconnect

> > > >>

> > > >> CQs are not destroyed until unmount. By draining CQs on transport

> > > >> disconnect, successful completions that can change the

> > > >> r.frmr.state field can be missed.

> >

> > Still those are missed isn’t it....Since those successful completions

> > will still be dropped after re- connection. Am I missing something to

> > understanding the motivation...

> >

> > > >>

> > > >> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

> > > >> ---

> > > >>   net/sunrpc/xprtrdma/verbs.c |    5 -----

> > > >>   1 file changed, 5 deletions(-)

> > > >>

> > > >> diff --git a/net/sunrpc/xprtrdma/verbs.c

> > > >> b/net/sunrpc/xprtrdma/verbs.c index 3c7f904..451e100 100644

> > > >> --- a/net/sunrpc/xprtrdma/verbs.c

> > > >> +++ b/net/sunrpc/xprtrdma/verbs.c

> > > >> @@ -873,9 +873,6 @@ retry:

> > > >>   			dprintk("RPC:       %s:

> rpcrdma_ep_disconnect"

> > > >>   				" status %i\n", __func__, rc);

> > > >>

> > > >> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> > > >> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);

> > > >> -

> > > >>   		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);

> > > >>   		id = rpcrdma_create_id(xprt, ia,

> > > >>   				(struct sockaddr *)&xprt-

> >rx_data.addr);

> > > @@ -985,8 +982,6 @@

> > > >> rpcrdma_ep_disconnect(struct rpcrdma_ep *ep, struct rpcrdma_ia

> > > >> *ia) {

> > > >>   	int rc;

> > > >>

> > > >> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> > > >> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);

> > > >>   	rc = rdma_disconnect(ia->ri_id);

> > > >>   	if (!rc) {

> > > >>   		/* returns without wait if not connected */

> > > >>

> > > >> --

> > > >> To unsubscribe from this list: send the line "unsubscribe linux-rdma"

> > > >> in the body of a message to majordomo@vger.kernel.org More

> > > majordomo

> > > >> info at http://vger.kernel.org/majordomo-info.html

> > > > N     r  y   b X  ?v ^ )?{.n +    {   "  ^n r   z   h    &   G   h 

> > > > ( ? ?j"   m     z ?   f   h   ~ mml==

>
Devesh Sharma July 2, 2014, 7:56 p.m. UTC | #9
> -----Original Message-----

> From: Steve Wise [mailto:swise@opengridcomputing.com]

> Sent: Thursday, July 03, 2014 1:21 AM

> To: Devesh Sharma; 'Chuck Lever'; linux-rdma@vger.kernel.org; linux-

> nfs@vger.kernel.org

> Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> disconnect

> 

> 

> 

> > -----Original Message-----

> > From: Devesh Sharma [mailto:Devesh.Sharma@Emulex.Com]

> > Sent: Wednesday, July 02, 2014 2:43 PM

> > To: Steve Wise; Chuck Lever; linux-rdma@vger.kernel.org;

> > linux-nfs@vger.kernel.org

> > Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > disconnect

> >

> > > -----Original Message-----

> > > From: Steve Wise [mailto:swise@opengridcomputing.com]

> > > Sent: Thursday, July 03, 2014 12:59 AM

> > > To: Devesh Sharma; Chuck Lever; linux-rdma@vger.kernel.org; linux-

> > > nfs@vger.kernel.org

> > > Subject: Re: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > > disconnect

> > >

> > > On 7/2/2014 2:06 PM, Devesh Sharma wrote:

> > > > This change is very much prone to generate poll_cq errors because

> > > > of un-cleaned completions which still point to the non-existent

> > > > QPs. On the new connection when these completions are polled, the

> > > > poll_cq will fail

> > > because old QP pointer is already NULL.

> > > > Did anyone hit this situation during their testing?

> > >

> > > Hey Devesh,

> > >

> > > iw_cxgb4 will silently toss CQEs if the QP is not active.

> >

> > Ya, just now checked that in mlx and cxgb4 driver code. On the other

> > hand ocrdma is asserting a BUG-ON for such CQEs causing system panic.

> > Out of curiosity I am asking, how this change is useful here, is it

> > reducing the re-connection time...Anyhow rpcrdma_clean_cq was

> > discarding the completions (flush/successful both)

> >

> 

> Well, I don't think there is anything restricting an application from destroying

> the QP with pending CQEs on its CQs.   So it definitely shouldn't cause a

> BUG_ON() I think.   I'll have to read up in the Verbs specs if destroying a QP

> kills all the pending CQEs...


I will double check ocrdma_destroy_qp code.

> 

> 

> > >

> > >

> > > >> -----Original Message-----

> > > >> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-

> > > >> owner@vger.kernel.org] On Behalf Of Chuck Lever

> > > >> Sent: Tuesday, June 24, 2014 4:10 AM

> > > >> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org

> > > >> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > > >> disconnect

> > > >>

> > > >> CQs are not destroyed until unmount. By draining CQs on transport

> > > >> disconnect, successful completions that can change the

> > > >> r.frmr.state field can be missed.

> >

> > Still those are missed isn’t it....Since those successful completions

> > will still be dropped after re- connection. Am I missing something to

> > understanding the motivation...

> >

> > > >>

> > > >> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

> > > >> ---

> > > >>   net/sunrpc/xprtrdma/verbs.c |    5 -----

> > > >>   1 file changed, 5 deletions(-)

> > > >>

> > > >> diff --git a/net/sunrpc/xprtrdma/verbs.c

> > > >> b/net/sunrpc/xprtrdma/verbs.c index 3c7f904..451e100 100644

> > > >> --- a/net/sunrpc/xprtrdma/verbs.c

> > > >> +++ b/net/sunrpc/xprtrdma/verbs.c

> > > >> @@ -873,9 +873,6 @@ retry:

> > > >>   			dprintk("RPC:       %s:

> rpcrdma_ep_disconnect"

> > > >>   				" status %i\n", __func__, rc);

> > > >>

> > > >> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> > > >> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);

> > > >> -

> > > >>   		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);

> > > >>   		id = rpcrdma_create_id(xprt, ia,

> > > >>   				(struct sockaddr *)&xprt-

> >rx_data.addr);

> > > @@ -985,8 +982,6 @@

> > > >> rpcrdma_ep_disconnect(struct rpcrdma_ep *ep, struct rpcrdma_ia

> > > >> *ia) {

> > > >>   	int rc;

> > > >>

> > > >> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> > > >> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);

> > > >>   	rc = rdma_disconnect(ia->ri_id);

> > > >>   	if (!rc) {

> > > >>   		/* returns without wait if not connected */

> > > >>

> > > >> --

> > > >> To unsubscribe from this list: send the line "unsubscribe linux-rdma"

> > > >> in the body of a message to majordomo@vger.kernel.org More

> > > majordomo

> > > >> info at http://vger.kernel.org/majordomo-info.html

> > > > N     r  y   b X  ?v ^ )?{.n +    {   "  ^n r   z   h    &   G   h 

> > > > ( ? ?j"   m     z ?   f   h   ~ mml==

>
Steve Wise July 2, 2014, 7:56 p.m. UTC | #10
> -----Original Message-----
> From: Devesh Sharma [mailto:Devesh.Sharma@Emulex.Com]
> Sent: Wednesday, July 02, 2014 2:54 PM
> To: Steve Wise; 'Chuck Lever'; linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org
> Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport disconnect
> 
> 
> 
> > -----Original Message-----
> > From: Steve Wise [mailto:swise@opengridcomputing.com]
> > Sent: Thursday, July 03, 2014 1:21 AM
> > To: Devesh Sharma; 'Chuck Lever'; linux-rdma@vger.kernel.org; linux-
> > nfs@vger.kernel.org
> > Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport
> > disconnect
> >
> >
> >
> > > -----Original Message-----
> > > From: Devesh Sharma [mailto:Devesh.Sharma@Emulex.Com]
> > > Sent: Wednesday, July 02, 2014 2:43 PM
> > > To: Steve Wise; Chuck Lever; linux-rdma@vger.kernel.org;
> > > linux-nfs@vger.kernel.org
> > > Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport
> > > disconnect
> > >
> > > > -----Original Message-----
> > > > From: Steve Wise [mailto:swise@opengridcomputing.com]
> > > > Sent: Thursday, July 03, 2014 12:59 AM
> > > > To: Devesh Sharma; Chuck Lever; linux-rdma@vger.kernel.org; linux-
> > > > nfs@vger.kernel.org
> > > > Subject: Re: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport
> > > > disconnect
> > > >
> > > > On 7/2/2014 2:06 PM, Devesh Sharma wrote:
> > > > > This change is very much prone to generate poll_cq errors because
> > > > > of un-cleaned completions which still point to the non-existent
> > > > > QPs. On the new connection when these completions are polled, the
> > > > > poll_cq will fail
> > > > because old QP pointer is already NULL.
> > > > > Did anyone hit this situation during their testing?
> > > >
> > > > Hey Devesh,
> > > >
> > > > iw_cxgb4 will silently toss CQEs if the QP is not active.
> > >
> > > Ya, just now checked that in mlx and cxgb4 driver code. On the other
> > > hand ocrdma is asserting a BUG-ON for such CQEs causing system panic.
> > > Out of curiosity I am asking, how this change is useful here, is it
> > > reducing the re-connection time...Anyhow rpcrdma_clean_cq was
> > > discarding the completions (flush/successful both)
> > >
> >
> > Well, I don't think there is anything restricting an application from destroying
> > the QP with pending CQEs on its CQs.   So it definitely shouldn't cause a
> > BUG_ON() I think.   I'll have to read up in the Verbs specs if destroying a QP
> > kills all the pending CQEs...
> 
> Oh confusion...let me clarify: in ocrdma BUG ON is hit in poll_cq() after re-connection happens
> and cq is polled again.
> Now the first completion in CQ still points to old QP-ID for which ocrdma does not have valid
> QP pointer.
>

Right.  Which means it’s a stale CQE.  I don't think that should cause a BUG_ON. 

 
> >
> >
> > > >
> > > >
> > > > >> -----Original Message-----
> > > > >> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> > > > >> owner@vger.kernel.org] On Behalf Of Chuck Lever
> > > > >> Sent: Tuesday, June 24, 2014 4:10 AM
> > > > >> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org
> > > > >> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport
> > > > >> disconnect
> > > > >>
> > > > >> CQs are not destroyed until unmount. By draining CQs on transport
> > > > >> disconnect, successful completions that can change the
> > > > >> r.frmr.state field can be missed.
> > >
> > > Still those are missed isn’t it....Since those successful completions
> > > will still be dropped after re- connection. Am I missing something to
> > > understanding the motivation...
> > >
> > > > >>
> > > > >> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> > > > >> ---
> > > > >>   net/sunrpc/xprtrdma/verbs.c |    5 -----
> > > > >>   1 file changed, 5 deletions(-)
> > > > >>
> > > > >> diff --git a/net/sunrpc/xprtrdma/verbs.c
> > > > >> b/net/sunrpc/xprtrdma/verbs.c index 3c7f904..451e100 100644
> > > > >> --- a/net/sunrpc/xprtrdma/verbs.c
> > > > >> +++ b/net/sunrpc/xprtrdma/verbs.c
> > > > >> @@ -873,9 +873,6 @@ retry:
> > > > >>   			dprintk("RPC:       %s:
> > rpcrdma_ep_disconnect"
> > > > >>   				" status %i\n", __func__, rc);
> > > > >>
> > > > >> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);
> > > > >> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);
> > > > >> -
> > > > >>   		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);
> > > > >>   		id = rpcrdma_create_id(xprt, ia,
> > > > >>   				(struct sockaddr *)&xprt-
> > >rx_data.addr);
> > > > @@ -985,8 +982,6 @@
> > > > >> rpcrdma_ep_disconnect(struct rpcrdma_ep *ep, struct rpcrdma_ia
> > > > >> *ia) {
> > > > >>   	int rc;
> > > > >>
> > > > >> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);
> > > > >> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);
> > > > >>   	rc = rdma_disconnect(ia->ri_id);
> > > > >>   	if (!rc) {
> > > > >>   		/* returns without wait if not connected */
> > > > >>
> > > > >> --
> > > > >> To unsubscribe from this list: send the line "unsubscribe linux-rdma"
> > > > >> in the body of a message to majordomo@vger.kernel.org More
> > > > majordomo
> > > > >> info at http://vger.kernel.org/majordomo-info.html
> > > > > N     r  y   b X  ?v ^ )?{.n +    {   "  ^n r   z   h    &   G   h 
> > > > > ( ? ?j"   m     z ?   f   h   ~ mml==
> >


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Devesh Sharma July 2, 2014, 7:57 p.m. UTC | #11
> -----Original Message-----

> From: Steve Wise [mailto:swise@opengridcomputing.com]

> Sent: Thursday, July 03, 2014 1:27 AM

> To: Devesh Sharma; 'Chuck Lever'; linux-rdma@vger.kernel.org; linux-

> nfs@vger.kernel.org

> Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> disconnect

> 

> 

> 

> > -----Original Message-----

> > From: Devesh Sharma [mailto:Devesh.Sharma@Emulex.Com]

> > Sent: Wednesday, July 02, 2014 2:54 PM

> > To: Steve Wise; 'Chuck Lever'; linux-rdma@vger.kernel.org;

> > linux-nfs@vger.kernel.org

> > Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > disconnect

> >

> >

> >

> > > -----Original Message-----

> > > From: Steve Wise [mailto:swise@opengridcomputing.com]

> > > Sent: Thursday, July 03, 2014 1:21 AM

> > > To: Devesh Sharma; 'Chuck Lever'; linux-rdma@vger.kernel.org; linux-

> > > nfs@vger.kernel.org

> > > Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport

> > > disconnect

> > >

> > >

> > >

> > > > -----Original Message-----

> > > > From: Devesh Sharma [mailto:Devesh.Sharma@Emulex.Com]

> > > > Sent: Wednesday, July 02, 2014 2:43 PM

> > > > To: Steve Wise; Chuck Lever; linux-rdma@vger.kernel.org;

> > > > linux-nfs@vger.kernel.org

> > > > Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on

> > > > transport disconnect

> > > >

> > > > > -----Original Message-----

> > > > > From: Steve Wise [mailto:swise@opengridcomputing.com]

> > > > > Sent: Thursday, July 03, 2014 12:59 AM

> > > > > To: Devesh Sharma; Chuck Lever; linux-rdma@vger.kernel.org;

> > > > > linux- nfs@vger.kernel.org

> > > > > Subject: Re: [PATCH v1 05/13] xprtrdma: Don't drain CQs on

> > > > > transport disconnect

> > > > >

> > > > > On 7/2/2014 2:06 PM, Devesh Sharma wrote:

> > > > > > This change is very much prone to generate poll_cq errors

> > > > > > because of un-cleaned completions which still point to the

> > > > > > non-existent QPs. On the new connection when these completions

> > > > > > are polled, the poll_cq will fail

> > > > > because old QP pointer is already NULL.

> > > > > > Did anyone hit this situation during their testing?

> > > > >

> > > > > Hey Devesh,

> > > > >

> > > > > iw_cxgb4 will silently toss CQEs if the QP is not active.

> > > >

> > > > Ya, just now checked that in mlx and cxgb4 driver code. On the

> > > > other hand ocrdma is asserting a BUG-ON for such CQEs causing system

> panic.

> > > > Out of curiosity I am asking, how this change is useful here, is

> > > > it reducing the re-connection time...Anyhow rpcrdma_clean_cq was

> > > > discarding the completions (flush/successful both)

> > > >

> > >

> > > Well, I don't think there is anything restricting an application from

> destroying

> > > the QP with pending CQEs on its CQs.   So it definitely shouldn't cause a

> > > BUG_ON() I think.   I'll have to read up in the Verbs specs if destroying a

> QP

> > > kills all the pending CQEs...

> >

> > Oh confusion...let me clarify: in ocrdma BUG ON is hit in poll_cq()

> > after re-connection happens and cq is polled again.

> > Now the first completion in CQ still points to old QP-ID for which

> > ocrdma does not have valid QP pointer.

> >

> 

> Right.  Which means it’s a stale CQE.  I don't think that should cause a

> BUG_ON.


Yes this surely needs a fix in ocrdma.

> 

> 

> > >

> > >

> > > > >

> > > > >

> > > > > >> -----Original Message-----

> > > > > >> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-

> > > > > >> owner@vger.kernel.org] On Behalf Of Chuck Lever

> > > > > >> Sent: Tuesday, June 24, 2014 4:10 AM

> > > > > >> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org

> > > > > >> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on

> > > > > >> transport disconnect

> > > > > >>

> > > > > >> CQs are not destroyed until unmount. By draining CQs on

> > > > > >> transport disconnect, successful completions that can change

> > > > > >> the r.frmr.state field can be missed.

> > > >

> > > > Still those are missed isn’t it....Since those successful

> > > > completions will still be dropped after re- connection. Am I

> > > > missing something to understanding the motivation...

> > > >

> > > > > >>

> > > > > >> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

> > > > > >> ---

> > > > > >>   net/sunrpc/xprtrdma/verbs.c |    5 -----

> > > > > >>   1 file changed, 5 deletions(-)

> > > > > >>

> > > > > >> diff --git a/net/sunrpc/xprtrdma/verbs.c

> > > > > >> b/net/sunrpc/xprtrdma/verbs.c index 3c7f904..451e100 100644

> > > > > >> --- a/net/sunrpc/xprtrdma/verbs.c

> > > > > >> +++ b/net/sunrpc/xprtrdma/verbs.c

> > > > > >> @@ -873,9 +873,6 @@ retry:

> > > > > >>   			dprintk("RPC:       %s:

> > > rpcrdma_ep_disconnect"

> > > > > >>   				" status %i\n", __func__, rc);

> > > > > >>

> > > > > >> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> > > > > >> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);

> > > > > >> -

> > > > > >>   		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);

> > > > > >>   		id = rpcrdma_create_id(xprt, ia,

> > > > > >>   				(struct sockaddr *)&xprt-

> > > >rx_data.addr);

> > > > > @@ -985,8 +982,6 @@

> > > > > >> rpcrdma_ep_disconnect(struct rpcrdma_ep *ep, struct

> > > > > >> rpcrdma_ia

> > > > > >> *ia) {

> > > > > >>   	int rc;

> > > > > >>

> > > > > >> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);

> > > > > >> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);

> > > > > >>   	rc = rdma_disconnect(ia->ri_id);

> > > > > >>   	if (!rc) {

> > > > > >>   		/* returns without wait if not connected */

> > > > > >>

> > > > > >> --

> > > > > >> To unsubscribe from this list: send the line "unsubscribe linux-

> rdma"

> > > > > >> in the body of a message to majordomo@vger.kernel.org More

> > > > > majordomo

> > > > > >> info at http://vger.kernel.org/majordomo-info.html

> > > > > > N     r  y   b X  ?v ^ )?{.n +    {   "  ^n r   z   h    &   G   h 

> > > > > > ( ? ?j"   m     z ?   f   h   ~ mml==

> > >

>
Chuck Lever July 2, 2014, 7:59 p.m. UTC | #12
On Jul 2, 2014, at 3:48 PM, Devesh Sharma <Devesh.Sharma@Emulex.Com> wrote:

> 
> 
>> -----Original Message-----
>> From: Steve Wise [mailto:swise@opengridcomputing.com]
>> Sent: Thursday, July 03, 2014 1:16 AM
>> To: 'Chuck Lever'; Devesh Sharma
>> Cc: linux-rdma@vger.kernel.org; 'Linux NFS Mailing List'
>> Subject: RE: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport
>> disconnect
>> 
>> 
>> 
>>> -----Original Message-----
>>> From: Chuck Lever [mailto:chuck.lever@oracle.com]
>>> Sent: Wednesday, July 02, 2014 2:40 PM
>>> To: Steve Wise; Devesh Sharma
>>> Cc: linux-rdma@vger.kernel.org; Linux NFS Mailing List
>>> Subject: Re: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport
>>> disconnect
>>> 
>>> 
>>> On Jul 2, 2014, at 3:28 PM, Steve Wise <swise@opengridcomputing.com>
>> wrote:
>>> 
>>>> On 7/2/2014 2:06 PM, Devesh Sharma wrote:
>>>>> This change is very much prone to generate poll_cq errors because
>>>>> of un-cleaned
>>> completions which still
>>>>> point to the non-existent QPs. On the new connection when these
>>>>> completions are polled,
>>> the poll_cq will
>>>>> fail because old QP pointer is already NULL.
>>>>> Did anyone hit this situation during their testing?
>>> 
>>> I tested this aggressively with a fault injector that triggers regular
>>> connection disruption.
>>> 
>>>> Hey Devesh,
>>>> 
>>>> iw_cxgb4 will silently toss CQEs if the QP is not active.
>>> 
>>> xprtrdma relies on getting a completion (either successful or in
>>> error) for every WR it has posted. The goal of this patch is to avoid
>>> throwing away queued completions after a transport disconnect so we
>>> don't lose track of FRMR rkey updates (FAST_REG_MR and LOCAL_INV
>>> completions) and we can capture all RPC replies posted before the
>> connection was lost.
>>> 
>>> Sounds like we also need to keep the QP around, even in error state,
>>> until all known WRs on that QP have completed?
>>> 
> 
> Why not poll and process every completion during rpcrdma_cq_cleanup()….

Yes, I have a patch in the next version of this series that does that.
It just calls rpcrdma_sendcq_upcall() from the connect worker. I will
squash that change into this patch.

Maybe it needs to invoke rpcrdma_recvcq_upcall() there as well.


> 
>> 
>> Perhaps.
>> 
>>> 
>>>> 
>>>> 
>>>>>> -----Original Message-----
>>>>>> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
>>>>>> owner@vger.kernel.org] On Behalf Of Chuck Lever
>>>>>> Sent: Tuesday, June 24, 2014 4:10 AM
>>>>>> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org
>>>>>> Subject: [PATCH v1 05/13] xprtrdma: Don't drain CQs on transport
>>>>>> disconnect
>>>>>> 
>>>>>> CQs are not destroyed until unmount. By draining CQs on transport
>>>>>> disconnect, successful completions that can change the
>>>>>> r.frmr.state field can be missed.
>>>>>> 
>>>>>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>>>>>> ---
>>>>>> net/sunrpc/xprtrdma/verbs.c |    5 -----
>>>>>> 1 file changed, 5 deletions(-)
>>>>>> 
>>>>>> diff --git a/net/sunrpc/xprtrdma/verbs.c
>>>>>> b/net/sunrpc/xprtrdma/verbs.c index 3c7f904..451e100 100644
>>>>>> --- a/net/sunrpc/xprtrdma/verbs.c
>>>>>> +++ b/net/sunrpc/xprtrdma/verbs.c
>>>>>> @@ -873,9 +873,6 @@ retry:
>>>>>> 			dprintk("RPC:       %s: rpcrdma_ep_disconnect"
>>>>>> 				" status %i\n", __func__, rc);
>>>>>> 
>>>>>> -		rpcrdma_clean_cq(ep->rep_attr.recv_cq);
>>>>>> -		rpcrdma_clean_cq(ep->rep_attr.send_cq);
>>>>>> -
>>>>>> 		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);
>>>>>> 		id = rpcrdma_create_id(xprt, ia,
>>>>>> 				(struct sockaddr *)&xprt->rx_data.addr);
>> @@ -985,8 +982,6 @@
>>>>>> rpcrdma_ep_disconnect(struct rpcrdma_ep *ep, struct rpcrdma_ia
>>>>>> *ia)  {
>>>>>> 	int rc;
>>>>>> 
>>>>>> -	rpcrdma_clean_cq(ep->rep_attr.recv_cq);
>>>>>> -	rpcrdma_clean_cq(ep->rep_attr.send_cq);
>>>>>> 	rc = rdma_disconnect(ia->ri_id);
>>>>>> 	if (!rc) {
>>>>>> 		/* returns without wait if not connected */
>>>>>> 
>>>>>> --
>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>> linux-rdma" in the body of a message to majordomo@vger.kernel.org
>>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>>> N     r  y   b X  ?v ^ )?{.n +    {   "  ^n r   z   h    &   G
>>>>> h ( ?
>>> ?j"   m     z ?   f   h   ~ mml==
>>>> 
>>>> --
>>>> 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
>>> 
>>> --
>>> Chuck Lever
>>> chuck[dot]lever[at]oracle[dot]com
>>> 
>>> 
>> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger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RdbGV2ZXJbYXRdb3JhY2xlW2RvdF1jb20NCj4gPj4+DQo+ID4+Pg0KPiA+Pg0KPiA+
IC0tDQo+ID4gVG8gdW5zdWJzY3JpYmUgZnJvbSB0aGlzIGxpc3Q6IHNlbmQgdGhlIGxpbmUgInVu
c3Vic2NyaWJlIGxpbnV4LXJkbWEiDQo+ID4gaW4gdGhlIGJvZHkgb2YgYSBtZXNzYWdlIHRvIG1h
am9yZG9tb0B2Z2VyLmtlcm5lbC5vcmcgTW9yZQ0KPiBtYWpvcmRvbW8NCj4gPiBpbmZvIGF0ICBo
dHRwOi8vdmdlci5rZXJuZWwub3JnL21ham9yZG9tby1pbmZvLmh0bWwNCj4gPg0KPiANCj4gLS0N
Cj4gQ2h1Y2sgTGV2ZXINCj4gY2h1Y2tbZG90XWxldmVyW2F0XW9yYWNsZVtkb3RdY29tDQo+IA0K
PiANCg0K
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 3c7f904..451e100 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -873,9 +873,6 @@  retry:
 			dprintk("RPC:       %s: rpcrdma_ep_disconnect"
 				" status %i\n", __func__, rc);
 
-		rpcrdma_clean_cq(ep->rep_attr.recv_cq);
-		rpcrdma_clean_cq(ep->rep_attr.send_cq);
-
 		xprt = container_of(ia, struct rpcrdma_xprt, rx_ia);
 		id = rpcrdma_create_id(xprt, ia,
 				(struct sockaddr *)&xprt->rx_data.addr);
@@ -985,8 +982,6 @@  rpcrdma_ep_disconnect(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia)
 {
 	int rc;
 
-	rpcrdma_clean_cq(ep->rep_attr.recv_cq);
-	rpcrdma_clean_cq(ep->rep_attr.send_cq);
 	rc = rdma_disconnect(ia->ri_id);
 	if (!rc) {
 		/* returns without wait if not connected */