netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jarkao2@gmail.com
Cc: hadi@cyberus.ca, slavon@bigtelecom.ru, denys@visp.net.lb,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net: gen_estimator: Fix gen_kill_estimator() lookups
Date: Mon, 24 Nov 2008 15:49:02 -0800 (PST)	[thread overview]
Message-ID: <20081124.154902.123250582.davem@davemloft.net> (raw)
In-Reply-To: <20081124133724.GC16755@ff.dom.local>

From: Jarek Poplawski <jarkao2@gmail.com>
Date: Mon, 24 Nov 2008 13:37:24 +0000

> On Mon, Nov 24, 2008 at 08:18:45AM -0500, jamal wrote:
> > On Mon, 2008-11-24 at 12:04 +0000, Jarek Poplawski wrote:
> > > gen_kill_estimator() linear lists lookups are very slow, and e.g. while
> > > deleting a large number of HTB classes soft lockups were reported. Here
> > > is another try to fix this problem: this time internally, with rbtree,
> > > so similarly to Jamal's hashing idea IIRC. (Looking for next hits could
> > > be still optimized, but it's really fast as it is.)
> > 
> > Certainly a big improvement. Compared to hashing i suggested:
> > the deletion speed is probably equal or better than using a hash.
> > I think a hash would have performed better in the case of addition
> > than the rb tree; but you primarily concerned about deletion, so this
> > good.
> 
> I first thought about a hash, but alas Patrick's solution is sched
> only... Anyway, I din't see too much overhead in memory use, and no
> diffrence in addition times (without batching).

The kinds of things that can matter in using tree vs. hash really
only occur in the data path, and all of this stuff is control plane.

> > Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>

Applied to net-next-2.6, thanks everyone.

      parent reply	other threads:[~2008-11-24 23:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 12:04 [PATCH] net: gen_estimator: Fix gen_kill_estimator() lookups Jarek Poplawski
2008-11-24 13:18 ` jamal
2008-11-24 13:37   ` Jarek Poplawski
2008-11-24 15:00     ` jamal
2008-11-25  7:52       ` Jarek Poplawski
2008-11-24 23:49     ` David Miller [this message]

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=20081124.154902.123250582.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=denys@visp.net.lb \
    --cc=hadi@cyberus.ca \
    --cc=jarkao2@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=slavon@bigtelecom.ru \
    /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).