aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-08-30 13:24:58 -0400
committerDavid S. Miller <davem@davemloft.net>2017-08-30 14:20:09 -0400
commit31770e34e43d6c8dee129bfee77e56c34e61f0e5 (patch)
treea4635a632732b39ef560a8f72eb3a81d04f01605 /net/ipv4/tcp_output.c
parentc1d2b4c3e204e602c97680335d082b8d012d08cd (diff)
tcp: Revert "tcp: remove header prediction"
This reverts commit 45f119bf936b1f9f546a0b139c5b56f9bb2bdc78. Eric Dumazet says: We found at Google a significant regression caused by 45f119bf936b1f9f546a0b139c5b56f9bb2bdc78 tcp: remove header prediction In typical RPC (TCP_RR), when a TCP socket receives data, we now call tcp_ack() while we used to not call it. This touches enough cache lines to cause a slowdown. so problem does not seem to be HP removal itself but the tcp_ack() call. Therefore, it might be possible to remove HP after all, provided one finds a way to elide tcp_ack for most cases. Reported-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 3e0d19631534..5b6690d05abb 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -295,7 +295,9 @@ static u16 tcp_select_window(struct sock *sk)
295 /* RFC1323 scaling applied */ 295 /* RFC1323 scaling applied */
296 new_win >>= tp->rx_opt.rcv_wscale; 296 new_win >>= tp->rx_opt.rcv_wscale;
297 297
298 /* If we advertise zero window, disable fast path. */
298 if (new_win == 0) { 299 if (new_win == 0) {
300 tp->pred_flags = 0;
299 if (old_win) 301 if (old_win)
300 NET_INC_STATS(sock_net(sk), 302 NET_INC_STATS(sock_net(sk),
301 LINUX_MIB_TCPTOZEROWINDOWADV); 303 LINUX_MIB_TCPTOZEROWINDOWADV);