lkml.org 
[lkml]   [2004]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] shrink core hashes on small systems
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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.079 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site