diff mbox

[v2,net-next] pkt_sched: fq: Fair Queue packet scheduler

Message ID 1378344185.11205.3.camel@edumazet-glaptop
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Sept. 5, 2013, 1:23 a.m. UTC
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) :



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);