From: Nick Piggin Date: Fri, 23 Jun 2006 09:03:22 +0000 (-0700) Subject: [PATCH] radix-tree: small X-Git-Tag: v2.6.18-rc1~1081^2~190 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfd9b7df4abd3257c9e381b0e445817b26a51c0c;p=linux-2.6 [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 35a2d93b35..7cbdada510 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -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