Browse Source

[PATCH] radix-tree: small

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>
Nick Piggin 19 years ago
parent
commit
cfd9b7df4a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/radix-tree.c

+ 1 - 1
lib/radix-tree.c

@@ -33,7 +33,7 @@
 
 
 
 
 #ifdef __KERNEL__
 #ifdef __KERNEL__
-#define RADIX_TREE_MAP_SHIFT	6
+#define RADIX_TREE_MAP_SHIFT	(CONFIG_BASE_SMALL ? 4 : 6)
 #else
 #else
 #define RADIX_TREE_MAP_SHIFT	3	/* For more stressful testing */
 #define RADIX_TREE_MAP_SHIFT	3	/* For more stressful testing */
 #endif
 #endif