Netdev List
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, netdev@vger.kernel.org, kaber@trash.net
Subject: Re: [PATCH net-next 2/2] rhashtable: Quick initial growth of tables
Date: Fri, 1 May 2015 15:38:01 +0200	[thread overview]
Message-ID: <20150501133801.GA5784@pox.localdomain> (raw)
In-Reply-To: <20150501043725.GA927@gondor.apana.org.au>

On 05/01/15 at 12:37pm, Herbert Xu wrote:
> On Fri, May 01, 2015 at 06:30:25AM +0200, Thomas Graf wrote:
> >
> > Yes, that can happen. Since shrinks are ordered to the end of the
> > chain it is often the case that enough entries have been added so the
> > shrink is not carried out in the end. Obviously this is also not the
> > case if no entries are actually removed.
> 
> It's just a matter of logical consistency.  At 75% if you grow by
> a factor of 4, you get 18.75% utilisation which is way below the
> 30% shrink threshold.
> 
> > What about we apply quick growing on >100% utilization? It is a
> > clear indication that we are growing rapidly.
> 
> Even at 100%, a factor of 4 leads you to 25% which is less than 30%.
> 
> Perhaps we could lower the shrink thresholds? Alternatively, only
> grow quickly if automatic shrinking is disabled.  After all, the one
> case that's inspring all of this, netlink really wants to grow
> quickly as well as only shrink at specific points in time.

Lowering the shrink threshold in combination with quick growth
above 100% sounds good to me. The whole point of this is to detect
when we are likely to see a lot of inserts with only a few or no
removals.

  reply	other threads:[~2015-05-01 13:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 22:46 [PATCH net-next 0/2] rhashtable: Quick initial table growth Thomas Graf
2015-04-30 22:46 ` [PATCH net-next 1/2] rhashtable: Simplify iterator code Thomas Graf
2015-04-30 23:41   ` Herbert Xu
2015-04-30 22:46 ` [PATCH net-next 2/2] rhashtable: Quick initial growth of tables Thomas Graf
2015-04-30 23:45   ` Herbert Xu
2015-05-01  4:30     ` Thomas Graf
2015-05-01  4:37       ` Herbert Xu
2015-05-01 13:38         ` Thomas Graf [this message]
2015-05-01 11:04   ` Sergei Shtylyov
2015-05-01 13:38     ` Thomas Graf

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=20150501133801.GA5784@pox.localdomain \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kaber@trash.net \
    --cc=netdev@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