]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix mount hash table
authorAndi Kleen <ak@muc.de>
Wed, 6 Feb 2002 14:13:54 +0000 (06:13 -0800)
committerLinus Torvalds <torvalds@athlon.transmeta.com>
Wed, 6 Feb 2002 14:13:54 +0000 (06:13 -0800)
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.

fs/namespace.c

index fdcc369fbe38fdbfc320a14cbac221b29aaf7f85..1419b179c74ce364ec512fe70848ccbe5817667b 100644 (file)
@@ -1048,15 +1048,9 @@ void __init mnt_init(unsigned long mempages)
        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");