public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gerald Schaefer <gerald.schaefer@gmx.net>
To: Matt Mackall <mpm@selenic.com>
Cc: akpm@osdl.org, arnd@arndb.de, schwidefsky@de.ibm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] shrink hash sizes on small machines, take 2
Date: Wed, 19 May 2004 19:40:03 +0200	[thread overview]
Message-ID: <200405191940.03273.gerald.schaefer@gmx.net> (raw)
In-Reply-To: <20040518174210.GD28735@waste.org>

On Tuesday 18 May 2004 19:42, you wrote:
> num_physpages should represent the memory available to the kernel for
> normal use and should not reflect any other reserved memory. Otherwise
> it'll unduly influence the hash sizes both with and without this
> patch.
This is a very good point, Arnd and I have been looking at our "mem=" hack
and it does look a little bit fishy...
There are possibly more things affected in the s390 kernel with "mem="
parameter, not only num_physpages (max_low_pfn, etc.), so we will have to
take a closer look and see what Martin thinks about it.

> Index: mm/fs/dcache.c
> ===================================================================
> --- mm.orig/fs/dcache.c       2004-05-18 12:29:28.000000000 -0500
> +++ mm/fs/dcache.c    2004-05-18 12:37:42.000000000 -0500
> @@ -1625,7 +1625,7 @@
>       /* Base hash sizes on available memory, with a reserve equal to
>             150% of current kernel size */
>  
> -     reserve = (mempages - nr_free_pages()) * 3/2;
> +     reserve = min((mempages - nr_free_pages()) * 3/2, mempages - 1);
>       mempages -= reserve;
>  
>       names_cachep = kmem_cache_create("names_cache",
This patch is o.k. for us, in our case (with "mem=") it would more or less
restore the previous situation (without the calculation, but still with a
potential memory problem on our side)

--
Gerald

  parent reply	other threads:[~2004-05-22  2:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-18 12:32 [PATCH] shrink hash sizes on small machines, take 2 Gerald Schaefer
     [not found] ` <20040518174210.GD28735@waste.org>
2004-05-19 17:40   ` Gerald Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-04-10 23:27 Matt Mackall
2004-04-15 15:16 ` Marcelo Tosatti

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=200405191940.03273.gerald.schaefer@gmx.net \
    --to=gerald.schaefer@gmx.net \
    --cc=akpm@osdl.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=schwidefsky@de.ibm.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