Thread (18 messages) 18 messages, 5 authors, 2013-09-05

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

From: Eric Dumazet <hidden>
Date: 2013-09-05 01:23:10
Subsystem: networking [general], networking [tcp], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Neal Cardwell, Linus Torvalds

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);
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help