]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: increase throughput when reordering is high
authorYuchung Cheng <ycheng@google.com>
Thu, 22 Aug 2013 00:29:23 +0000 (17:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Aug 2013 21:39:46 +0000 (14:39 -0700)
commit2e480f42ae23d4327c3627a40156a58ddb0560be
tree984571f61086e60bc7bad6d6fb62222299cebd95
parent8d00a98b296fecac14b7bae9d340dbe3a05abaad
tcp: increase throughput when reordering is high

The stack currently detects reordering and avoid spurious
retransmission very well. However the throughput is sub-optimal under
high reordering because cwnd is increased only if the data is deliverd
in order. I.e., FLAG_DATA_ACKED check in tcp_ack().  The more packet
are reordered the worse the throughput is.

Therefore when reordering is proven high, cwnd should advance whenever
the data is delivered regardless of its ordering. If reordering is low,
conservatively advance cwnd only on ordered deliveries in Open state,
and retain cwnd in Disordered state (RFC5681).

Using netperf on a qdisc setup of 20Mbps BW and random RTT from 45ms
to 55ms (for reordering effect). This change increases TCP throughput
by 20 - 25% to near bottleneck BW.

A special case is the stretched ACK with new SACK and/or ECE mark.
For example, a receiver may receive an out of order or ECN packet with
unacked data buffered because of LRO or delayed ACK. The principle on
such an ACK is to advance cwnd on the cummulative acked part first,
then reduce cwnd in tcp_fastretrans_alert().

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c