Skip to content

improving TCP behavior on host congestion

Yuchung Cheng netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8tcp: exit if nothing to retransmit on RTO timeoutnet/ipv4/tcp_timer.c+2 -40 replies
2/8tcp: always timestamp on every skb transmissionnet/ipv4/tcp_output.c+8 -80 replies
3/8tcp: always set retrans_stamp on recoverynet/ipv4/tcp_output.c net/ipv4/tcp_timer.c+7 -250 replies
4/8tcp: properly track retry time on passive Fast Opennet/ipv4/tcp_timer.c+3 -00 replies
5/8tcp: create a helper to model exponential backoffnet/ipv4/tcp_timer.c+18 -130 replies
6/8tcp: simplify window probe aborting on USER_TIMEOUTnet/ipv4/tcp_timer.c+7 -70 replies
7/8tcp: retry more conservatively on local congestionnet/ipv4/tcp_timer.c+3 -50 replies
8/8tcp: less aggressive window probing on local congestionnet/ipv4/tcp_output.c+7 -150 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchNeal CardwellSoheil Hassas Yeganeh
1/8R-b R-b
2/8R-b R-b
3/8R-b R-b
4/8R-b R-b
5/8R-b R-b
6/8R-b R-b
7/8R-b R-b
8/8R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/8] improving TCP behavior on host congestion

This patch set aims to improve how TCP handle local qdisc congestion by simplifying the previous implementation. Previously when an skb fails to (re)transmit due to local qdisc congestion or other resource issue, TCP refrains from setting the skb timestamp or the recovery starting time.

This design makes determining when to abort a stalling socket more complicated, as the timestamps of these tranmission attempts were missing. The stack needs to sort of infer when the original attempt happens. A by-product is a socket may disregard the system timeout limit (i.e. sysctl net.ipv4.tcp_retries2 or USER_TIMEOUT option), and continue to retry until the transmission is successful.

In data-center environment when TCP RTO is small, this could cause the socket to retry frequently for long during qdisc congestion.

The solution is to first unconditionally timestamp skb and recovery attempt. Then retry more conservatively (twice a second) on local qdisc congestion but abort the sockets according to the system limit.

Yuchung Cheng (8):
tcp: exit if nothing to retransmit on RTO timeout
tcp: always timestamp on every skb transmission
tcp: always set retrans_stamp on recovery
tcp: properly track retry time on passive Fast Open
tcp: create a helper to model exponential backoff
tcp: simplify window probe aborting on USER_TIMEOUT
tcp: retry more conservatively on local congestion
tcp: less aggressive window probing on local congestion

 net/ipv4/tcp_output.c | 47 ++++++++++--------------
 net/ipv4/tcp_timer.c  | 83 ++++++++++++++++++-------------------------
 2 files changed, 54 insertions(+), 76 deletions(-)
Signature · 1 line
2.20.1.97.g81188d93c3-goog