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