twx-linux/tools/include/linux
Matthew Wilcox f6bb2a2c0b xarray: add the xa_lock to the radix_tree_root
This results in no change in structure size on 64-bit machines as it
fits in the padding between the gfp_t and the void *.  32-bit machines
will grow the structure from 8 to 12 bytes.  Almost all radix trees are
protected with (at least) a spinlock, so as they are converted from
radix trees to xarrays, the data structures will shrink again.

Initialising the spinlock requires a name for the benefit of lockdep, so
RADIX_TREE_INIT() now needs to know the name of the radix tree it's
initialising, and so do IDR_INIT() and IDA_INIT().

Also add the xa_lock() and xa_unlock() family of wrappers to make it
easier to use the lock.  If we could rely on -fplan9-extensions in the
compiler, we could avoid all of this syntactic sugar, but that wasn't
added until gcc 4.6.

Link: http://lkml.kernel.org/r/20180313132639.17387-8-willy@infradead.org
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-04-11 10:28:39 -07:00
..
sched
unaligned
atomic.h
bitmap.h perf tools: Add MEM_TOPOLOGY feature to perf data file 2018-03-08 11:30:46 -03:00
bitops.h
bug.h
compiler-gcc.h
compiler.h tools/include: Remove ACCESS_ONCE() 2017-12-12 13:22:10 +01:00
coresight-pmu.h
debug_locks.h
delay.h
err.h
export.h
filter.h
ftrace.h
gfp.h
hardirq.h
hash.h
hashtable.h
interrupt.h
irqflags.h
jhash.h
kallsyms.h
kern_levels.h
kernel.h
linkage.h
list.h
lockdep.h tools/lib/lockdep: Add missing declaration of 'pr_cont()' 2017-12-13 11:17:35 +01:00
log2.h
module.h
mutex.h
poison.h
proc_fs.h
rbtree_augmented.h
rbtree.h
rcu.h
refcount.h
seq_file.h
spinlock.h xarray: add the xa_lock to the radix_tree_root 2018-04-11 10:28:39 -07:00
stacktrace.h
string.h
stringify.h
time64.h
types.h