[PATCH] : Fix stretch ACK performance killer when doing ucopy.

Linux Kernel Mailing List <[email protected]> Tue, 24 May 2005 12:48:22 +0000
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1556, 2005/05/24 09:48:22-03:00, [email protected]

	[PATCH] : Fix stretch ACK performance killer when doing ucopy.
	
	[TCP]: Fix stretch ACK performance killer when doing ucopy.
	
	When we are doing ucopy, we try to defer the ACK generation to
	cleanup_rbuf().  This works most of the time very well, but if the
	ucopy prequeue is large, this ACKing behavior kills performance.
	
	With TSO, it is possible to fill the prequeue so large that by the
	time the ACK is sent and gets back to the sender, most of the window
	has emptied of data and performance suffers significantly.
	
	This behavior does help in some cases, so we should think about
	re-enabling this trick in the future, using some kind of limit in
	order to avoid the bug case.
	
	Signed-off-by: David S. Miller <[email protected]>



 tcp_input.c |   11 +----------
 1 files changed, 1 insertion(+), 10 deletions(-)


diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c	2005-05-24 14:07:01 -07:00
+++ b/net/ipv4/tcp_input.c	2005-05-24 14:07:01 -07:00
@@ -4243,16 +4243,7 @@
 					goto no_ack;
 			}
 
-			if (eaten) {
-				if (tcp_in_quickack_mode(tp)) {
-					tcp_send_ack(sk);
-				} else {
-					tcp_send_delayed_ack(sk);
-				}
-			} else {
-				__tcp_ack_snd_check(sk, 0);
-			}
-
+			__tcp_ack_snd_check(sk, 0);
 no_ack:
 			if (eaten)
 				__kfree_skb(skb);