Thread (7 messages) flat view 7 messages, 4 authors, 2012-07-20

Re: [PATCH v2 net-next] tcp: fix ABC in tcp_slow_start()

From: Neal Cardwell <ncardwell@google.com>
Date: 2012-07-20 16:03:46

On Fri, Jul 20, 2012 at 8:07 AM, Yuchung Cheng [off-list ref] wrote:
On Fri, Jul 20, 2012 at 8:02 AM, Eric Dumazet [off-list ref] wrote:
quoted
        tp->snd_cwnd_cnt += cnt;
        while (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
Nice catch, Eric.

One thing that's always bothered me about the tp->snd_cwnd_cnt code is
that the slow start and congestion avoidance use different criteria
for incrementing snd_cwnd_cnt. tcp_slow_start() increments
snd_cwnd_cnt by snd_cwnd for each ACKed packet, and congestion
avoidance increases snd_cwnd_cnt by just 1 for each packet.

This means that if we exit slow start and enter congestion avoidance,
then we think we can have a "credit" for a bunch of ACKs that never
happened (up to snd_cwnd-1), so we can conceivably do our first
additive increase in congestion avoidance up to almost 1RTT too
early. Can we just get rid of the use of snd_cwnd_cnt in slow start,
and just use local variables in tcp_slow_start() rather than trying to
carry state between ACKs?

neal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help