• Chuck Lever's avatar
    xprtrdma: Avoid deadlock when credit window is reset · e7ce710a
    Chuck Lever authored
    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: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    e7ce710a
rpc_rdma.c 26.6 KB