On Wed, 2017-09-13 at 19:27 +0300, Denys Fedoryshchenko wrote:
> On 2017-09-13 19:16, Eric Dumazet wrote:
> > On Wed, 2017-09-13 at 18:34 +0300, Denys Fedoryshchenko wrote:
> >> Well, probably i am answering my own question, removing estimator from
> >> classes seems drastically improve situation.
> >> It seems estimator has some issues that cause shaper to behave
> >> incorrectly (throttling traffic while it should not).
> >> But i guess thats a bug?
> >> As i was not able to predict such bottleneck by CPU load measurements.
> > 
> > Well, there was a reason we disabled HTB class estimators by default ;)
> > 
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=64153ce0a7b61b2a5cacb01805cbf670142339e9
> 
> As soon as disabling it solve my problem - i'm fine, hehe, but i guess 
> other people who might hit this problem, should be aware how to find 
> reason.
> They should not be disappointed in Linux :)

Well, if they enable rate estimators while kernel does not set them by
default, they get what they want, at a cost.

> Because i can't measure this bottleneck before it happens, i'm seeing on 
> mpstat all cpu's are idle, and same time traffic is throttled.

Normally things were supposed to get much better in linux-4.10

( 
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=1c0d32fde5bdf1184bc274f864c09799278a1114
 )

But I apparently added a scaling bug.

I will try :

diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
index 
0385dece1f6fe5e26df1ce5f40956a79a2eebbf4..7c1ffd6f950172c1915d8e5fa2b5e3f77e4f4c78
 100644
--- a/net/core/gen_estimator.c
+++ b/net/core/gen_estimator.c
@@ -83,10 +83,10 @@ static void est_timer(unsigned long arg)
        u64 rate, brate;
 
        est_fetch_counters(est, &b);
-       brate = (b.bytes - est->last_bytes) << (8 - est->ewma_log);
+       brate = (b.bytes - est->last_bytes) << (10 - est->ewma_log - 
est->intvl_log);
        brate -= (est->avbps >> est->ewma_log);
 
-       rate = (u64)(b.packets - est->last_packets) << (8 - est->ewma_log);
+       rate = (u64)(b.packets - est->last_packets) << (10 - est->ewma_log - 
est->intvl_log);
        rate -= (est->avpps >> est->ewma_log);
 
        write_seqcount_begin(&est->seq);
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c



Reply via email to