lkml.org 
[lkml]   [2002]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix mount hash table

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");
-
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 13:18    [W:0.029 / U:3.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site