netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v3 net-next] net_sched: gen_estimator: complete rewrite of rate estimators
Date: Mon, 05 Dec 2016 15:22:23 -0500 (EST)	[thread overview]
Message-ID: <20161205.152223.2283744541131458900.davem@davemloft.net> (raw)
In-Reply-To: <1480873696.18162.470.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 04 Dec 2016 09:48:16 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> 1) Old code was hard to maintain, due to complex lock chains.
>    (We probably will be able to remove some kfree_rcu() in callers)
> 
> 2) Using a single timer to update all estimators does not scale.
> 
> 3) Code was buggy on 32bit kernel (WRITE_ONCE() on 64bit quantity
>    is not supposed to work well)
> 
> In this rewrite :
> 
> - I removed the RB tree that had to be scanned in
>   gen_estimator_active(). qdisc dumps should be much faster.
> 
> - Each estimator has its own timer.
> 
> - Estimations are maintained in net_rate_estimator structure,
>   instead of dirtying the qdisc. Minor, but part of the simplification.
> 
> - Reading the estimator uses RCU and a seqcount to provide proper
>   support for 32bit kernels.
> 
> - We reduce memory need when estimators are not used, since
>   we store a pointer, instead of the bytes/packets counters.
> 
> - xt_rateest_mt() no longer has to grab a spinlock.
>   (In the future, xt_rateest_tg() could be switched to per cpu counters)
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> v3: Renamed some parameters to please make htmldocs
> v2: Removed unwanted changes to tcp_output.c

This was probably long overdue, thanks for working on this.

Applied, thanks Eric.

  reply	other threads:[~2016-12-05 20:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-04  7:07 [PATCN net-next] net_sched: gen_estimator: complete rewrite of rate estimators Eric Dumazet
2016-12-04  7:12 ` Eric Dumazet
2016-12-04  7:18 ` [PATCN v2 " Eric Dumazet
2016-12-04 11:22   ` kbuild test robot
2016-12-04 17:10   ` Eric Dumazet
2016-12-04 17:48   ` [PATCH v3 " Eric Dumazet
2016-12-05 20:22     ` David Miller [this message]
2016-12-04 12:42 ` [PATCN " kbuild test robot

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=20161205.152223.2283744541131458900.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).