This website requires JavaScript.
Explore
Help
Sign in
public-mirrors
/
linux
Watch
1
Star
0
Fork
You've already forked linux
0
mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced
2025-05-14 19:53:03 +00:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
Actions
02c02bf12c
linux
/
tools
/
testing
/
radix-tree
/
generated
/
autoconf.h
3 lines
69 B
C
Raw
Normal View
History
Unescape
Escape
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:02:26 -07:00
#
define CONFIG_RADIX_TREE_MULTIORDER 1
xarray: Change definition of sibling entries Instead of storing a pointer to the slot containing the canonical entry, store the offset of the slot. Produces slightly more efficient code (~300 bytes) and simplifies the implementation. Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Josef Bacik <jbacik@fb.com>
2017-11-03 23:09:45 -04:00
#
define CONFIG_XARRAY_MULTI 1
Reference in a new issue
Copy permalink