netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Josefsson <gandalf@wlug.westbo.se>
To: davidm@hpl.hp.com
Cc: kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org,
	linux-ia64@linuxia64.org, netdev@oss.sgi.com
Subject: Re: fix TCP roundtrip time update code
Date: 03 Jun 2003 19:41:11 +0200	[thread overview]
Message-ID: <1054662070.701.6.camel@tux.rsn.bth.se> (raw)
In-Reply-To: <200306031552.h53FqknC023999@napali.hpl.hp.com>

(trimmed CC line and added netdev)

On Tue, 2003-06-03 at 17:52, David Mosberger wrote:
> One of those very-hard-to-track-down, trivial-to-fix kind of problems:
> without this patch, TCP roundtrip time measurements will corrupt the
> routing cache's RTT estimates under heavy network load (the bug causes
> RTAX_RTT to go negative, but since its type is u32, you end up with a
> huge positive value...).  From there on, later TCP connections quickly
> will go south.
> 
> The typo was introduced 8 months ago in v1.29 of the file by the patch
> entitled "Cleanup DST metrics and abstrct MSS/PMTU further".

I tested this patch and it looks like it has cured my mysterious TCP
stalls.

without patch:

    cache  mtu 1500 rtt 479411ms rttvar 953813ms cwnd 46 advmss 1460

I see that before and during the stall if not using this patch.
(rtt is never above 20ms accoring to ping)

With the patch I see normal rtt and rttvar times.
Havn't seen a stall yet (~30 kernelcompiles with distcc over a sometimes
congested link), will continue testing.

> ===== net/ipv4/tcp_input.c 1.36 vs edited =====
> --- 1.36/net/ipv4/tcp_input.c	Mon Apr 28 09:27:57 2003
> +++ edited/net/ipv4/tcp_input.c	Tue Jun  3 08:19:36 2003
> @@ -556,8 +556,8 @@
>  			if (m >= dst_metric(dst, RTAX_RTTVAR))
>  				dst->metrics[RTAX_RTTVAR-1] = m;
>  			else
> -				dst->metrics[RTAX_RTT-1] -=
> -					(dst->metrics[RTAX_RTT-1] - m)>>2;
> +				dst->metrics[RTAX_RTTVAR-1] -=
> +					(dst->metrics[RTAX_RTTVAR-1] - m)>>2;
>  		}
>  
>  		if (tp->snd_ssthresh >= 0xFFFF) {

-- 
/Martin

       reply	other threads:[~2003-06-03 17:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200306031552.h53FqknC023999@napali.hpl.hp.com>
2003-06-03 17:41 ` Martin Josefsson [this message]
2003-06-03 18:45   ` fix TCP roundtrip time update code David Mosberger
2003-06-04  0:24     ` James Morris
2003-06-04  0:43       ` kuznet
2003-06-04  2:01         ` Nivedita Singhvi
2003-06-04  3:23           ` David S. Miller
2003-06-04  4:35             ` David Mosberger
2003-06-04  4:40               ` Nivedita Singhvi
2003-06-04  5:34                 ` David Mosberger
2003-06-04  5:52                   ` David S. Miller
2003-06-04  6:12                     ` David Mosberger
2003-06-04  6:04                   ` Nivedita Singhvi
2003-06-04  6:19                     ` David Mosberger
2003-06-04  7:51                       ` David S. Miller
2003-06-04  4:47               ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1054662070.701.6.camel@tux.rsn.bth.se \
    --to=gandalf@wlug.westbo.se \
    --cc=davidm@hpl.hp.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-ia64@linuxia64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).