Message ID | 20240409164355.1721078-1-hli@netflix.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 697a6c8cec03c2299f850fa50322641a8bf6b915 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,v3] tcp: increase the default TCP scaling ratio | expand |
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Tue, 9 Apr 2024 09:43:55 -0700 you wrote: > After commit dfa2f0483360 ("tcp: get rid of sysctl_tcp_adv_win_scale"), > we noticed an application-level timeout due to reduced throughput. > > Before the commit, for a client that sets SO_RCVBUF to 65k, it takes > around 22 seconds to transfer 10M data. After the commit, it takes 40 > seconds. Because our application has a 30-second timeout, this > regression broke the application. > > [...] Here is the summary with links: - [net-next,v3] tcp: increase the default TCP scaling ratio https://git.kernel.org/netdev/net-next/c/697a6c8cec03 You are awesome, thank you!
diff --git a/include/net/tcp.h b/include/net/tcp.h index 6ae35199d3b3..2bcf30381d75 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1539,11 +1539,10 @@ static inline int tcp_space_from_win(const struct sock *sk, int win) return __tcp_space_from_win(tcp_sk(sk)->scaling_ratio, win); } -/* Assume a conservative default of 1200 bytes of payload per 4K page. +/* Assume a 50% default for skb->len/skb->truesize ratio. * This may be adjusted later in tcp_measure_rcv_mss(). */ -#define TCP_DEFAULT_SCALING_RATIO ((1200 << TCP_RMEM_TO_WIN_SCALE) / \ - SKB_TRUESIZE(4096)) +#define TCP_DEFAULT_SCALING_RATIO (1 << (TCP_RMEM_TO_WIN_SCALE - 1)) static inline void tcp_scaling_ratio_init(struct sock *sk) {