diff options
| author | David S. Miller <davem@davemloft.net> | 2017-04-26 21:44:39 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-04-26 21:44:39 +0300 |
| commit | 4629498336e48516f5a03ee2788701f1d3f20168 (patch) | |
| tree | 7ceebdc356adf410a9d78bd51d7e200697d19658 /include/linux | |
| parent | 038a3e858de4e3ddf42c330a22b7efcddbc0a81a (diff) | |
| parent | 645f4c6f2ebd040688cc2a5f626ffc909e66ccf2 (diff) | |
| download | linux-4629498336e48516f5a03ee2788701f1d3f20168.tar.xz | |
Merge branch 'tcp-do-not-use-tcp_time_stamp-for-rcv-autotuning'
Eric Dumazet says:
====================
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.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/tcp.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index cbe5b602a2d3..b6d5adcee8fc 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -240,6 +240,7 @@ struct tcp_sock { u32 tlp_high_seq; /* snd_nxt at the time of TLP retransmit. */ /* RTT measurement */ + struct skb_mstamp tcp_mstamp; /* most recent packet received/sent */ u32 srtt_us; /* smoothed round trip time << 3 in usecs */ u32 mdev_us; /* medium deviation */ u32 mdev_max_us; /* maximal mdev for the last rtt period */ @@ -332,16 +333,16 @@ struct tcp_sock { /* Receiver side RTT estimation */ struct { - u32 rtt; - u32 seq; - u32 time; + u32 rtt_us; + u32 seq; + struct skb_mstamp time; } rcv_rtt_est; /* Receiver queue space */ struct { - int space; - u32 seq; - u32 time; + int space; + u32 seq; + struct skb_mstamp time; } rcvq_space; /* TCP-specific MTU probe information. */ |
