Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jason Wang <jasowang@redhat.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Yuchung Cheng <ycheng@google.com>,
	Neal Cardwell <ncardwell@google.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v2 net-next] pkt_sched: fq: Fair Queue packet scheduler
Date: Wed, 04 Sep 2013 18:23:05 -0700	[thread overview]
Message-ID: <1378344185.11205.3.camel@edumazet-glaptop> (raw)
In-Reply-To: <1378342226.11205.1.camel@edumazet-glaptop>

On Wed, 2013-09-04 at 17:50 -0700, Eric Dumazet wrote:

> 
> BTW what is your HZ value ?
> 
> We have a problem in TCP stack, because srtt is in HZ units.
> 
> Before we change to us units, I guess tcp_update_pacing_rate() should be
> changed a bit if HZ=250

Oh well, I feel dumb, please try this fix (If you have HZ != 1000) :

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 93d7e9d..fd96d8e 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -700,7 +700,7 @@ static void tcp_update_pacing_rate(struct sock *sk)
 	u64 rate;
 
 	/* set sk_pacing_rate to 200 % of current rate (mss * cwnd / srtt) */
-	rate = (u64)tp->mss_cache * 2 * (HZ << 3);
+	rate = (u64)tp->mss_cache * 2 * ((USEC_PER_SEC/HZ) << 3);
 
 	rate *= max(tp->snd_cwnd, tp->packets_out);
 

  reply	other threads:[~2013-09-05  1:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 22:49 [PATCH v2 net-next] pkt_sched: fq: Fair Queue packet scheduler Eric Dumazet
2013-08-30  1:47 ` David Miller
2013-08-30  2:30   ` [PATCH iproute2] " Eric Dumazet
2013-09-03 15:49     ` Stephen Hemminger
2013-09-04  5:26 ` [PATCH v2 net-next] " Jason Wang
2013-09-04  5:59   ` Eric Dumazet
2013-09-04  6:30     ` Jason Wang
2013-09-04 10:30       ` Eric Dumazet
2013-09-04 11:27         ` Eric Dumazet
2013-09-04 11:59           ` Daniel Borkmann
2013-09-05  3:39             ` Jason Wang
2013-09-05  0:50           ` Eric Dumazet
2013-09-05  1:23             ` Eric Dumazet [this message]
2013-09-05  3:43             ` Jason Wang
2013-09-05  3:34           ` Jason Wang
2013-09-05  3:07         ` Jason Wang
2013-09-05  3:41           ` Eric Dumazet
2013-09-05  5:16             ` Jason Wang

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=1378344185.11205.3.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.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