]> git.baikalelectronics.ru Git - kernel.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)
commite70f01d8867a36774a107d9189b411bff1c35112
treef9c4a23768955b85ee7d6cf519906004c86aff61
parentb89cba148435c8777b8917e0e30100b30364e70a
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