• J
    tcp: tsq: fix nonagle handling · bf06200e
    John Ogness 提交于
    Commit 46d3ceab ("tcp: TCP Small Queues") introduced a possible
    regression for applications using TCP_NODELAY.
    
    If TCP session is throttled because of tsq, we should consult
    tp->nonagle when TX completion is done and allow us to send additional
    segment, especially if this segment is not a full MSS.
    Otherwise this segment is sent after an RTO.
    
    [edumazet] : Cooked the changelog, added another fix about testing
    sk_wmem_alloc twice because TX completion can happen right before
    setting TSQ_THROTTLED bit.
    
    This problem is particularly visible with recent auto corking,
    but might also be triggered with low tcp_limit_output_bytes
    values or NIC drivers delaying TX completion by hundred of usec,
    and very low rtt.
    
    Thomas Glanzmann for example reported an iscsi regression, caused
    by tcp auto corking making this bug quite visible.
    
    Fixes: 46d3ceab ("tcp: TCP Small Queues")
    Signed-off-by: NJohn Ogness <john.ogness@linutronix.de>
    Signed-off-by: NEric Dumazet <edumazet@google.com>
    Reported-by: NThomas Glanzmann <thomas@glanzmann.de>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    bf06200e
tcp_output.c 92.1 KB