]> err.no Git - linux-2.6/commitdiff
[PATCH] radix-tree: small
authorNick Piggin <npiggin@suse.de>
Fri, 23 Jun 2006 09:03:22 +0000 (02:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:42:49 +0000 (07:42 -0700)
Reduce radix tree node memory usage by about a factor of 4 for small files
(< 64K).  There are pointer traversal and memory usage costs for large
files with dense pagecache.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
lib/radix-tree.c

index 35a2d93b3528f1cbcd1b81f205ba5521b61f8333..7cbdada51049738f4bd105f88f1ca0956daa390f 100644 (file)
@@ -33,7 +33,7 @@
 
 
 #ifdef __KERNEL__
-#define RADIX_TREE_MAP_SHIFT   6
+#define RADIX_TREE_MAP_SHIFT   (CONFIG_BASE_SMALL ? 4 : 6)
 #else
 #define RADIX_TREE_MAP_SHIFT   3       /* For more stressful testing */
 #endif