lkml.org 
[lkml]   [2004]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] shrink core hashes on small systems
Shrink hashes on small systems

Tweak vfs_caches_init logic so that hashes don't start growing as
quickly on small systems.


tiny-mpm/init/main.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN init/main.c~hash-sizes init/main.c
--- tiny/init/main.c~hash-sizes 2004-03-20 12:14:43.000000000 -0600
+++ tiny-mpm/init/main.c 2004-03-20 12:14:43.000000000 -0600
@@ -470,7 +470,9 @@ asmlinkage void __init start_kernel(void
buffer_init();
unnamed_dev_init();
security_scaffolding_startup();
- 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));
radix_tree_init();
signals_init();
/* rootfs populating might need page-writeback */
_


--
Matt Mackall : http://www.selenic.com : Linux development and consulting
-
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.051 / U:2.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site