linux/tools
Ross Zwisler 21ef533931 radix-tree: add support for multi-order iterating
This enables the macros radix_tree_for_each_slot() and friends to be
used with multi-order entries.

The way that this works is that we treat all entries in a given slots[]
array as a single chunk.  If the index given to radix_tree_next_chunk()
happens to point us to a sibling entry, we will back up iter->index so
that it points to the canonical entry, and that will be the place where
we start our iteration.

As we're processing a chunk in radix_tree_next_slot(), we process
canonical entries, skip over sibling entries, and restart the chunk
lookup if we find a non-sibling indirect pointer.  This drops back to
the radix_tree_next_chunk() code, which will re-walk the tree and look
for another chunk.

This allows us to properly handle multi-order entries mixed with other
entries that are at various heights in the radix tree.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com>
Cc: Jan Kara <jack@suse.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-20 17:58:30 -07:00
..
arch
build perf probe: Check if dwarf_getlocations() is available 2016-05-12 11:26:59 -03:00
cgroup
firewire
gpio tools/gpio: Add missing initialization of device_name 2016-03-31 11:51:30 +02:00
hv tools/hv: Use include/uapi with __EXPORTED_HEADERS__ 2016-02-07 21:34:12 -08:00
iio iio: generic_buffer: be helpful about enabling channels 2015-08-16 10:51:26 +01:00
include Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-24 10:02:14 -07:00
laptop/freefall Move freefall program from Documentation/ to tools/ 2015-06-08 16:42:07 -06:00
lguest tools/lguest: Force disable tboot and APM 2016-04-22 10:29:03 +02:00
lib Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-05-16 14:08:43 -07:00
net tools: bpf_jit_disasm: check for klogctl failure 2016-05-08 23:32:59 -04:00
nfsd
objtool objtool: Detect falling through to the next function 2016-04-16 11:14:17 +02:00
perf powerpc updates for 4.7 2016-05-20 10:12:41 -07:00
power ACPI material for v4.7-rc1 2016-05-16 19:41:41 -07:00
scripts tools: Move utilities.mak from perf to tools/scripts/ 2016-03-18 13:57:20 -03:00
spi spi: spidev_test: Fix typo in error message 2015-12-08 17:58:56 +00:00
testing radix-tree: add support for multi-order iterating 2016-05-20 17:58:30 -07:00
thermal/tmon tools/thermal: tmon: use pkg-config also for CFLAGS 2015-10-10 11:32:31 +08:00
time
usb usb: patches for v4.4 merge window 2015-10-22 17:19:33 -07:00
virtio virtio_ring: Support DMA APIs 2016-03-02 17:01:57 +02:00
vm tools/vm/page-types.c: avoid memset() in walk_pfn() when count == 1 2016-03-17 15:09:34 -07:00
Makefile tools build: Fix perf_clean target 2016-04-25 17:59:36 -03:00