]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: don't mark recently sent packets lost on RTO
authorYuchung Cheng <ycheng@google.com>
Wed, 16 May 2018 23:40:17 +0000 (16:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 May 2018 19:41:29 +0000 (15:41 -0400)
commit71b9caf0fd565eeea8861b7290f93559947a2a10
treec543d69724d87f1128c00ce80843727902515fdf
parentdf844214c9be7edb3e829ab4ab505ff213f889b9
tcp: don't mark recently sent packets lost on RTO

An RTO event indicates the head has not been acked for a long time
after its last (re)transmission. But the other packets are not
necessarily lost if they have been only sent recently (for example
due to application limit). This patch would prohibit marking packets
sent within an RTT to be lost on RTO event, using similar logic in
TCP RACK detection.

Normally the head (SND.UNA) would be marked lost since RTO should
fire strictly after the head was sent. An exception is when the
most recent RACK RTT measurement is larger than the (previous)
RTO. To address this exception the head is always marked lost.

Congestion control interaction: since we may not mark every packet
lost, the congestion window may be more than 1 (inflight plus 1).
But only one packet will be retransmitted after RTO, since
tcp_retransmit_timer() calls tcp_retransmit_skb(...,segs=1). The
connection still performs slow start from one packet (with Cubic
congestion control).

This commit was tested in an A/B test with Google web servers,
and showed a reduction of 2% in (spurious) retransmits post
timeout (SlowStartRetrans), and correspondingly reduced DSACKs
(DSACKIgnoredOld) by 7%.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c