]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: remove SOCK_QUEUE_SHRUNK
authorEric Dumazet <edumazet@google.com>
Mon, 14 Sep 2020 10:20:27 +0000 (03:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Sep 2020 20:36:00 +0000 (13:36 -0700)
commit34f44be70521947e71c8816d24506b99cbe6b7bd
treede1b8b6e854d40adf306ebc7ab79cc73d3cd4133
parent16f7ddcfa863e569514dafb64280fcd778fd5e3e
tcp: remove SOCK_QUEUE_SHRUNK

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: 7f900a05a58b ("tcp: TCP_NOTSENT_LOWAT socket option")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c