aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.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.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.c')
-rw-r--r--net/ipv4/tcp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 566083ee2654..21ca2df274c5 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1963,8 +1963,10 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
1963 tcp_rcv_space_adjust(sk); 1963 tcp_rcv_space_adjust(sk);
1964 1964
1965skip_copy: 1965skip_copy:
1966 if (tp->urg_data && after(tp->copied_seq, tp->urg_seq)) 1966 if (tp->urg_data && after(tp->copied_seq, tp->urg_seq)) {
1967 tp->urg_data = 0; 1967 tp->urg_data = 0;
1968 tcp_fast_path_check(sk);
1969 }
1968 if (used + offset < skb->len) 1970 if (used + offset < skb->len)
1969 continue; 1971 continue;
1970 1972