android_kernel_xiaomi_sm8350/include
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
..
acpi [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-alpha
asm-arm WorkQueue: Fix up arch-specific work items where possible 2006-12-05 19:36:26 +00:00
asm-arm26 [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-avr32 [PATCH] Centralise definitions of sector_t and blkcnt_t 2006-12-04 19:41:15 -08:00
asm-cris
asm-frv [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-generic [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-h8300 [PATCH] Centralise definitions of sector_t and blkcnt_t 2006-12-04 19:41:15 -08:00
asm-i386 [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-ia64 [PATCH] numa node ids are int, page_to_nid and zone_to_nid should return int 2006-12-07 08:39:23 -08:00
asm-m32r
asm-m68k
asm-m68knommu [PATCH] m68knommu: remove FP conditionals in ucontext struct 2006-12-06 07:41:26 -08:00
asm-mips [PATCH] mm: k{,um}map_atomic() vs in_atomic() 2006-12-07 08:39:21 -08:00
asm-parisc [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-powerpc [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-ppc [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-s390 [PATCH] Centralise definitions of sector_t and blkcnt_t 2006-12-04 19:41:15 -08:00
asm-sh sh: sh775x/titan fixes for irq header changes. 2006-12-06 12:05:02 +09:00
asm-sh64
asm-sparc
asm-sparc64 [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-um
asm-v850
asm-x86_64 [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-xtensa
crypto
keys
linux [PATCH] radix-tree: RCU lockless readside 2006-12-07 08:39:25 -08:00
math-emu
media
mtd
net [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
pcmcia [PATCH] pcmcia: multifunction card handling fixes 2006-12-04 20:09:15 -05:00
rdma
rxrpc
scsi [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
sound Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-05 17:01:28 +00:00
video
Kbuild