]> git.openfabrics.org - ~emulex/infiniband.git/commit
xprtrdma: Avoid deadlock when credit window is reset
authorChuck Lever <chuck.lever@oracle.com>
Wed, 28 May 2014 14:34:57 +0000 (10:34 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 4 Jun 2014 12:56:52 +0000 (08:56 -0400)
commite7ce710a8802351bd4118c5d6136c1d850f67cf9
treef9c4a23768955b85ee7d6cf519906004c86aff61
parent4f4cf5ad6fc1b16dc8dc9d750bb80b35eba5e98d
xprtrdma: Avoid deadlock when credit window is reset

Update the cwnd while processing the server's reply.  Otherwise the
next task on the xprt_sending queue is still subject to the old
credit window. Currently, no task is awoken if the old congestion
window is still exceeded, even if the new window is larger, and a
deadlock results.

This is an issue during a transport reconnect. Servers don't
normally shrink the credit window, but the client does reset it to
1 when reconnecting so the server can safely grow it again.

As a minor optimization, remove the hack of grabbing the initial
cwnd size (which happens to be RPC_CWNDSCALE) and using that value
as the congestion scaling factor. The scaling value is invariant,
and we are better off without the multiplication operation.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/xprt_rdma.h