mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Holt <holt@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Robin Holt <holt@sgi.com>,
	davem@davemloft.net, yoshfuji@linux-ipv6.org,
	hirofumi@parknet.co.jp, torvalds@osdl.org, dipankar@ibm.com,
	laforge@gnumonks.org, bunk@stusta.de, herbert@apana.org.au,
	paulmck@ibm.com, netdev@oss.sgi.com,
	linux-kernel@vger.kernel.org, gnb@sgi.com
Subject: Re: [RFC] Limit the size of the IPV4 route hash.
Date: Fri, 10 Dec 2004 17:27:22 -0600	[thread overview]
Message-ID: <20041210232722.GC24468@lnx-holt.americas.sgi.com> (raw)
In-Reply-To: <20041210130947.1d945422.akpm@osdl.org>

On Fri, Dec 10, 2004 at 01:09:47PM -0800, Andrew Morton wrote:
> Robin Holt <holt@sgi.com> wrote:
> >  Can we agree that a linear calculation based on num_physpages is probably
> >  not the best algorithm.  If so, should we make it a linear to a limit or
> >  a logarithmically decreasing size to a limit?  How do we determine that
> >  limit point?
> 
> An initial default of N + M * log2(num_physpages) would probably give a
> saner result.
> 
> The big risk is that someone has a too-small table for some specific
> application and their machine runs more slowly than it should, but they
> never notice.  I wonder if it would be possible to put a little once-only
> printk into the routing code: "warning route-cache chain exceeded 100
> entries: consider using the rhash_entries boot option".

Since the hash gets flushed every 10 seconds, what if we kept track of
the maximum depth reached and when we reach a certain threshold, just
allocate a larger hash and replace the old with the new.  I do like the
printk idea so the admin can prevent inconsistent performance early in
the run cycle for the system.  We could even scale the hash size up based
upon demand.

Thanks,
Robin

  reply	other threads:[~2004-12-10 23:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-10 19:00 Robin Holt
2004-12-10 19:48 ` David S. Miller
2004-12-10 21:00   ` Robin Holt
2004-12-10 21:06     ` David S. Miller
2004-12-10 21:09     ` Andrew Morton
2004-12-10 23:27       ` Robin Holt [this message]
2004-12-10 23:38         ` Andrew Morton
2004-12-10 23:37           ` Robin Holt
2004-12-10 23:40             ` Robin Holt
2004-12-13  0:55               ` David S. Miller

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=20041210232722.GC24468@lnx-holt.americas.sgi.com \
    --to=holt@sgi.com \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=davem@davemloft.net \
    --cc=dipankar@ibm.com \
    --cc=gnb@sgi.com \
    --cc=herbert@apana.org.au \
    --cc=hirofumi@parknet.co.jp \
    --cc=laforge@gnumonks.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=paulmck@ibm.com \
    --cc=torvalds@osdl.org \
    --cc=yoshfuji@linux-ipv6.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

all inboxes | Powered by JetHome®