[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1342800536.2626.7670.camel@edumazet-glaptop>
Date: Fri, 20 Jul 2012 18:08:56 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Neal Cardwell <ncardwell@...gle.com>
Cc: Yuchung Cheng <ycheng@...gle.com>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Tom Herbert <therbert@...gle.com>,
Stephen Hemminger <shemminger@...tta.com>,
John Heffner <johnwheffner@...il.com>,
Nandita Dukkipati <nanditad@...gle.com>
Subject: Re: [PATCH v2 net-next] tcp: fix ABC in tcp_slow_start()
On Fri, 2012-07-20 at 09:03 -0700, Neal Cardwell wrote:
> On Fri, Jul 20, 2012 at 8:07 AM, Yuchung Cheng <ycheng@...gle.com> wrote:
> > On Fri, Jul 20, 2012 at 8:02 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> >> 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?
Apparently tcp_slow_start() needs the snd_cwnd_cnt in case
"limited slow start" is used :
cnt = sysctl_tcp_max_ssthresh >> 1;
So to address your point, maybe we should clear snd_cwnd_cnt
when leaving slow start for congestion avoidance phase ?
--
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