Skip to content

tcp: do not use tcp_time_stamp for rcv autotuning

Eric Dumazet netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10tcp: add tp->tcp_mstamp fieldinclude/linux/tcp.h net/ipv4/tcp_input.c+4 -04 replies
2/10tcp: do not pass timestamp to tcp_rack_detect_loss()net/ipv4/tcp_recovery.c+4 -72 replies
3/10tcp: do not pass timestamp to tcp_rack_mark_lost()include/net/tcp.h net/ipv4/tcp_input.c net/ipv4/tcp_recovery.c+3 -31 reply
4/10tcp: do not pass timestamp to tcp_rack_identify_loss()net/ipv4/tcp_input.c+4 -51 reply
5/10tcp: do not pass timestamp to tcp_fastretrans_alert()net/ipv4/tcp_input.c+4 -81 reply
6/10tcp: do not pass timestamp to tcp_rate_gen()include/net/tcp.h net/ipv4/tcp_input.c net/ipv4/tcp_rate.c+6 -61 reply
7/10tcp: do not pass timestamp to tcp_rack_advance()include/net/tcp.h net/ipv4/tcp_input.c net/ipv4/tcp_recovery.c+5 -91 reply
8/10tcp: use tp->tcp_mstamp in tcp_clean_rtx_queue()net/ipv4/tcp_input.c+1 -11 reply
9/10tcp: remove ack_time from struct tcp_sacktag_statenet/ipv4/tcp_input.c+0 -41 reply
10/10tcp: switch rcv_rtt_est and rcvq_space to high resolution timestampsinclude/linux/tcp.h net/ipv4/tcp.c net/ipv4/tcp_input.c+24 -181 reply

Reviews trailers per patch

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

PatchSoheil Hassas YeganehNeal Cardwell
1/10A-b A-b
2/10A-b A-b
3/10A-b A-b
4/10A-b A-b
5/10A-b A-b
6/10A-b A-b
7/10A-b A-b
8/10A-b A-b
9/10A-b A-b
10/10A-b A-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 00/10] tcp: do not use tcp_time_stamp for rcv autotuning

Some devices or linux distributions use HZ=100 or HZ=250

TCP receive buffer autotuning has poor behavior caused by this choice. Since autotuning happens after 4 ms or 10 ms, short distance flows get their receive buffer tuned to a very high value, but after an initial period where it was frozen to (too small) initial value.

With BBR (or other CC allowing to increase BDP), we are willing to increase tcp_rmem[2], but this receive autotuning defect is a blocker for hosts dealing with gazillions of TCP flows in the data centers, since many of them have inflated RCVBUF. Risk of OOM is too high.

Note that TSO autodefer, tcp cubic, and TCP TS options (RFC 7323) also suffer from our dependency to jiffies (via tcp_time_stamp).

We have ongoing efforts to improve all that in the future.

Eric Dumazet (10):
tcp: add tp->tcp_mstamp field
tcp: do not pass timestamp to tcp_rack_detect_loss()
tcp: do not pass timestamp to tcp_rack_mark_lost()
tcp: do not pass timestamp to tcp_rack_identify_loss()
tcp: do not pass timestamp to tcp_fastretrans_alert()
tcp: do not pass timestamp to tcp_rate_gen()
tcp: do not pass timestamp to tcp_rack_advance()
tcp: use tp->tcp_mstamp in tcp_clean_rtx_queue()
tcp: remove ack_time from struct tcp_sacktag_state
tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps

 include/linux/tcp.h     | 13 +++++-----
 include/net/tcp.h       |  7 +++--
 net/ipv4/tcp.c          |  2 +-
 net/ipv4/tcp_input.c    | 69 +++++++++++++++++++++++--------------------------
 net/ipv4/tcp_rate.c     |  7 ++---
 net/ipv4/tcp_recovery.c | 18 +++++--------
 6 files changed, 55 insertions(+), 61 deletions(-)
Signature · 1 line
2.13.0.rc0.306.g87b477812d-goog