Skip to content

Commit 9b05890

Browse files
howletttehcaster
authored andcommitted
maple_tree: Prefilled sheaf conversion and testing
Use prefilled sheaves instead of bulk allocations. This should speed up the allocations and the return path of unused allocations. Remove the push and pop of nodes from the maple state as this is now handled by the slab layer with sheaves. Testing has been removed as necessary since the features of the tree have been reduced. Signed-off-by: Liam R. Howlett <[email protected]> Reviewed-by: Suren Baghdasaryan <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
1 parent fdbebab commit 9b05890

File tree

4 files changed

+88
-710
lines changed

4 files changed

+88
-710
lines changed

include/linux/maple_tree.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,8 @@ struct ma_state {
442442
struct maple_enode *node; /* The node containing this entry */
443443
unsigned long min; /* The minimum index of this node - implied pivot min */
444444
unsigned long max; /* The maximum index of this node - implied pivot max */
445-
struct maple_alloc *alloc; /* Allocated nodes for this operation */
445+
struct slab_sheaf *sheaf; /* Allocated nodes for this operation */
446+
unsigned long node_request; /* The number of nodes to allocate for this operation */
446447
enum maple_status status; /* The status of the state (active, start, none, etc) */
447448
unsigned char depth; /* depth of tree descent during write */
448449
unsigned char offset;
@@ -490,7 +491,8 @@ struct ma_wr_state {
490491
.status = ma_start, \
491492
.min = 0, \
492493
.max = ULONG_MAX, \
493-
.alloc = NULL, \
494+
.node_request = 0, \
495+
.sheaf = NULL, \
494496
.mas_flags = 0, \
495497
.store_type = wr_invalid, \
496498
}

0 commit comments

Comments
 (0)