linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [rfc][patch] radix-tree: small data structure
@ 2006-04-23 15:43 Nick Piggin
  2006-04-23 15:46 ` Nick Piggin
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Piggin @ 2006-04-23 15:43 UTC (permalink / raw)
  To: Matt Mackall; +Cc: Linux Kernel Mailing List, Linux Memory Management

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

With the previous patch, the radix_tree_node budget on my 64-bit
desktop is cut from 20MB to 10MB. This patch should cut it again
by nearly a factor of 4 (haven't verified, but 98ish % of files
are under 64K).

I wonder if this would be of any interest for those who enable
CONFIG_BASE_SMALL?

-- 
SUSE Labs, Novell Inc.

[-- Attachment #2: radix-tree-tag_get-fix.patch --]
[-- Type: text/plain, Size: 761 bytes --]

Index: rtth/radix-tree.c
===================================================================
--- rtth.orig/radix-tree.c	2006-04-22 18:40:38.000000000 +1000
+++ rtth/radix-tree.c	2006-04-23 04:46:15.000000000 +1000
@@ -458,9 +458,8 @@ EXPORT_SYMBOL(radix_tree_tag_clear);
  *
  * Return values:
  *
- *  0: tag not present
+ *  0: tag not set or not present
  *  1: tag present, set
- * -1: tag present, unset
  */
 int radix_tree_tag_get(struct radix_tree_root *root,
 			unsigned long index, unsigned int tag)
@@ -494,7 +493,7 @@ int radix_tree_tag_get(struct radix_tree
 			int ret = tag_get(slot, tag, offset);
 
 			BUG_ON(ret && saw_unset_tag);
-			return ret ? 1 : -1;
+			return ret;
 		}
 		slot = slot->slots[offset];
 		shift -= RADIX_TREE_MAP_SHIFT;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-23 21:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-23 15:43 [rfc][patch] radix-tree: small data structure Nick Piggin
2006-04-23 15:46 ` Nick Piggin
2006-04-23 21:12   ` Matt Mackall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).