• Eric Dumazet's avatar
    tcp: remove SOCK_QUEUE_SHRUNK · 0cbe6a8f
    Eric Dumazet authored
    SOCK_QUEUE_SHRUNK is currently used by TCP as a temporary state
    that remembers if some room has been made in the rtx queue
    by an incoming ACK packet.
    
    This is later used from tcp_check_space() before
    considering to send EPOLLOUT.
    
    Problem is: If we receive SACK packets, and no packet
    is removed from RTX queue, we can send fresh packets, thus
    moving them from write queue to rtx queue and eventually
    empty the write queue.
    
    This stall can happen if TCP_NOTSENT_LOWAT is used.
    
    With this fix, we no longer risk stalling sends while holes
    are repaired, and we can fully use socket sndbuf.
    
    This also removes a cache line dirtying for typical RPC
    workloads.
    
    Fixes: c9bee3b7 ("tcp: TCP_NOTSENT_LOWAT socket option")
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Cc: Soheil Hassas Yeganeh <soheil@google.com>
    Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
    Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0cbe6a8f
tcp_output.c 118 KB