linux-IllusionX/lib
Nick Piggin 7cf9c2c76c [PATCH] radix-tree: RCU lockless readside
Make radix tree lookups safe to be performed without locks.  Readers are
protected against nodes being deleted by using RCU based freeing.  Readers
are protected against new node insertion by using memory barriers to ensure
the node itself will be properly written before it is visible in the radix
tree.

Each radix tree node keeps a record of their height (above leaf nodes).
This height does not change after insertion -- when the radix tree is
extended, higher nodes are only inserted in the top.  So a lookup can take
the pointer to what is *now* the root node, and traverse down it even if
the tree is concurrently extended and this node becomes a subtree of a new
root.

"Direct" pointers (tree height of 0, where root->rnode points directly to
the data item) are handled by using the low bit of the pointer to signal
whether rnode is a direct pointer or a pointer to a radix tree node.

When a reader wants to traverse the next branch, they will take a copy of
the pointer.  This pointer will be either NULL (and the branch is empty) or
non-NULL (and will point to a valid node).

[akpm@osdl.org: cleanups]
[Lee.Schermerhorn@hp.com: bugfixes, comments, simplifications]
[clameter@sgi.com: build fix]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:25 -08:00
..
reed_solomon
zlib_deflate
zlib_inflate
.gitignore
audit.c
bitmap.c
bust_spinlocks.c
cmdline.c
cpumask.c
crc-ccitt.c
crc16.c
crc32.c
crc32defs.h
ctype.c
debug_locks.c
dec_and_lock.c
div64.c
dump_stack.c
extable.c
find_next_bit.c
gen_crc32table.c
genalloc.c
halfmd4.c
hweight.c
idr.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
inflate.c
int_sqrt.c
iomap.c [PATCH] Arch provides generic iomap missing accessors 2006-12-04 15:59:52 +11:00
iomap_copy.c
ioremap.c
irq_regs.c
Kconfig
Kconfig.debug
kernel_lock.c
klist.c
kobject.c
kobject_uevent.c
kref.c
libcrc32c.c
list_debug.c
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c
Makefile
parser.c
percpu_counter.c
plist.c
prio_tree.c
radix-tree.c [PATCH] radix-tree: RCU lockless readside 2006-12-07 08:39:25 -08:00
random32.c [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
rbtree.c
rwsem-spinlock.c
rwsem.c
semaphore-sleepers.c
sha1.c
smp_processor_id.c
sort.c
spinlock_debug.c
string.c
swiotlb.c
textsearch.c
ts_bm.c
ts_fsm.c
ts_kmp.c
vsprintf.c