mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Matt Mackall <mpm@selenic.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] shrink core hashes on small systems
Date: Mon, 5 Apr 2004 14:02:23 -0700	[thread overview]
Message-ID: <20040405140223.2f775da4.akpm@osdl.org> (raw)
In-Reply-To: <20040405204957.GF6248@waste.org>

Matt Mackall <mpm@selenic.com> wrote:
>
> Shrink hashes on small systems
> 
> Tweak vfs_caches_init logic so that hashes don't start growing as
> quickly on small systems.
> 
> -	vfs_caches_init(num_physpages);
> +	/* Treat machines smaller than 6M as having 2M of memory
> +	   for hash-sizing purposes */
> +	vfs_caches_init(max(500, (int)num_physpages-1000));

This seems rather arbitrary.  It also implicitly "knows" that
PAGE_SIZE=4096.

num_physpages is of course the wrong thing to use here - on small systems
we should be accounting for memory which is pinned by kernel text, etc.

But you're going further than that.  What's the theory here?

  reply	other threads:[~2004-04-05 21:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-05 20:49 Matt Mackall
2004-04-05 21:02 ` Andrew Morton [this message]
2004-04-05 21:19   ` Matt Mackall
2004-04-05 21:38     ` Andrew Morton
2004-04-05 22:59       ` Matt Mackall
2004-04-06  6:31         ` Bryan Rittmeyer
2004-04-07  5:21       ` Marcelo Tosatti
2004-04-07 18:10         ` Matt Mackall
2004-04-07 22:53     ` Benjamin Herrenschmidt

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=20040405140223.2f775da4.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    /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

Powered by JetHome