[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2088500005.27728019.1355843484620.JavaMail.root@redhat.com>
Date: Tue, 18 Dec 2012 10:11:24 -0500 (EST)
From: Cong Wang <amwang@...hat.com>
To: netdev@...r.kernel.org
Cc: Ben Greear <greearb@...delatech.com>,
David Miller <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
Stephen Hemminger <shemminger@...tta.com>,
Rick Jones <rick.jones2@...com>, Thomas Graf <tgraf@...hat.com>
Subject: TCP delayed ACK heuristic
Hello, TCP experts!
Some time ago, Ben sent a patch [1] to add some knobs for
tuning TCP delayed ACK, but rejected by David.
David's point is that we can do some heuristics for TCP
delayed ACK, so the question is that what kind of heuristics
can we use?
RFC1122 explicitly mentions:
A TCP SHOULD implement a delayed ACK, but an ACK should not
be excessively delayed; in particular, the delay MUST be
less than 0.5 seconds, and in a stream of full-sized
segments there SHOULD be an ACK for at least every second
segment.
so this prevents us from using any heuristic for the number
of coalesced delayed ACK.
For the timeout of a delayed ACK, my idea is guessing how many
packet we suppose to receive is the TCP stream is fully utilized,
something like below:
+static inline u32 tcp_expect_packets(struct sock *sk)
+{
+ struct tcp_sock *tp = tcp_sk(sk);
+ int rtt = tp->srtt >> 3;
+ u32 idle = tcp_time_stamp - inet_csk(sk)->icsk_ack.lrcvtime;
+
+ return idle * 2 / rtt;
+}
...
+ ato -= tcp_expect_packets(sk) * delta;
The more we expect, the less we should delay. However this is
not accurate due to congestion control.
Meanwhile, we can also check how many packets are pending in TCP
sending queue, the more we pend, the more we can piggyback with
a single ACK, but not beyond how much we are able to send at
that time.
Comments? Ideas?
Thanks.
1. http://thread.gmane.org/gmane.linux.network/233859
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists