android_kernel_xiaomi_sm8350/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 fix file specification in comments 2006-10-03 23:01:26 +02:00
zlib_deflate
zlib_inflate
.gitignore
audit.c
bitmap.c [PATCH] bitmap: parse input from kernel and user buffers 2006-10-11 11:14:22 -07:00
bust_spinlocks.c
cmdline.c
cpumask.c [PATCH] highest_possible_node_id() linkage fix 2006-10-20 10:26:43 -07:00
crc16.c
crc32.c
crc32defs.h
crc-ccitt.c
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 [PATCH] make genpool allocator adhere to kernel-doc standards 2006-10-02 07:57:12 -07:00
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_copy.c
iomap.c [PATCH] Arch provides generic iomap missing accessors 2006-12-04 15:59:52 +11:00
ioremap.c [PATCH] Generic ioremap_page_range: flush_cache_vmap 2006-10-01 00:39:31 -07:00
irq_regs.c [PATCH] irq_reqs: export __irq_regs 2006-10-06 08:53:40 -07:00
Kconfig
Kconfig.debug [ARM] 3909/1: Disable UWIND_INFO for ARM (again) 2006-10-28 10:15:31 +01:00
kernel_lock.c
klist.c
kobject_uevent.c driver core: Introduce device_move(): move a device to a new parent. 2006-12-01 14:52:01 -08:00
kobject.c driver core: Introduce device_move(): move a device to a new parent. 2006-12-01 14:52:01 -08:00
kref.c
libcrc32c.c
list_debug.c [PATCH] list_del-debug fix 2006-10-01 00:39:17 -07:00
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 [PATCH] remove carta_random32 2006-10-17 08:18:43 -07:00
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 [PATCH] rbtree: fixed reversed RB_EMPTY_NODE and rb_next/prev 2006-09-30 20:26:56 +02:00
rwsem-spinlock.c Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass() 2006-10-11 01:45:14 -04:00
rwsem.c Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass() 2006-10-11 01:45:14 -04:00
semaphore-sleepers.c
sha1.c
smp_processor_id.c
sort.c [PATCH] low performance of lib/sort.c 2006-10-03 08:03:41 -07:00
spinlock_debug.c Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass() 2006-10-11 01:45:14 -04:00
string.c [PATCH] strstrip remove last blank fix 2006-10-28 11:30:54 -07:00
swiotlb.c
textsearch.c Fix typos in doc and comments 2006-11-30 05:32:19 +01:00
ts_bm.c
ts_fsm.c [PATCH] lib/ts_fsm.c: constify structs 2006-09-29 09:18:23 -07:00
ts_kmp.c
vsprintf.c