linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] shrink core hashes on small systems
@ 2004-04-05 20:49 Matt Mackall
  2004-04-05 21:02 ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Matt Mackall @ 2004-04-05 20:49 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-04-07 22:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-05 20:49 [PATCH] shrink core hashes on small systems Matt Mackall
2004-04-05 21:02 ` Andrew Morton
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).