public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix mount hash table
@ 2002-02-07  2:39 Andi Kleen
  0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2002-02-07  2:39 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Alexander Viro


On my 512MB machine with 6 mount points the mount hash table uses 64K.
This patch brings it to a more reasonable size by limiting it to one
page. 

Patch against 2.5.4pre1. Please apply. 

-Andi



--- linux-2.5.4pre1-work/fs/namespace.c-o	Wed Jan 30 22:38:09 2002
+++ linux-2.5.4pre1-work/fs/namespace.c	Thu Feb  7 03:35:53 2002
@@ -1048,15 +1048,9 @@
 	if (!mnt_cache)
 		panic("Cannot create vfsmount cache");
 
-	mempages >>= (16 - PAGE_SHIFT);
-	mempages *= sizeof(struct list_head);
-	for (order = 0; ((1UL << order) << PAGE_SHIFT) < mempages; order++)
-		;
-
-	do {
-		mount_hashtable = (struct list_head *)
-			__get_free_pages(GFP_ATOMIC, order);
-	} while (mount_hashtable == NULL && --order >= 0);
+	order = 0; 
+	mount_hashtable = (struct list_head *)
+		__get_free_pages(GFP_ATOMIC, order);
 
 	if (!mount_hashtable)
 		panic("Failed to allocate mount hash table\n");

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-07  2:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-07  2:39 [PATCH] Fix mount hash table Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox