[PATCH] radix tree: early termination of tag clearing
authorNick Piggin <nickpiggin@yahoo.com.au>
Sun, 8 Jan 2006 09:01:41 +0000 (01:01 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:13:41 +0000 (20:13 -0800)
commitd5274261ea46f0aae93820fe36628249120d2f75
treee95c41295270c55ef27a3534894f066f31719ecc
parent6e954b9e90c3a7157c0c1457dd3919e2a1345d23
[PATCH] radix tree: early termination of tag clearing

Correctly determine the tags to be cleared in radix_tree_delete() so we
don't keep moving up the tree clearing tags that we don't need to.  For
example, if a tag is simply not set in the deleted item, nor anywhere up
the tree, radix_tree_delete() would attempt to clear it up the entire
height of the tree.

Also, tag_set() was made conditional so as not to dirty too many cachelines
high up in the radix tree.  Instead, put this logic into
radix_tree_tag_set().

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