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>
This commit is contained in:
@@ -59,10 +59,7 @@ static inline bool radix_tree_is_internal_node(void *ptr)
|
||||
|
||||
#define RADIX_TREE_MAX_TAGS 3
|
||||
|
||||
#ifndef RADIX_TREE_MAP_SHIFT
|
||||
#define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6)
|
||||
#endif
|
||||
|
||||
#define RADIX_TREE_MAP_SHIFT XA_CHUNK_SHIFT
|
||||
#define RADIX_TREE_MAP_SIZE (1UL << RADIX_TREE_MAP_SHIFT)
|
||||
#define RADIX_TREE_MAP_MASK (RADIX_TREE_MAP_SIZE-1)
|
||||
|
||||
|
Reference in New Issue
Block a user