]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Avoid unnecessary ascending
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 17 Apr 2023 16:10:57 +0000 (12:10 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 21 Apr 2023 14:06:40 +0000 (10:06 -0400)
commitd73f8565566c1756996f937b793614d9dc3573ba
treef5a3fea1532d7e9552b0f31194ddc0120d8726ca
parentf17b0ab65d17988d5e6d6fe22f708ef3721080bf
maple_tree: Avoid unnecessary ascending

The maple tree node limits are implied by the parent.  When walking up
the tree, the limit may not be known until a slot that does not have
implied limits are encountered.  However, if the node is the left-most
or right-most node, the walking up to find that limit can be skipped.

This commit also fixes the debug/testing code that was not setting the
limit on walking down the tree as that optimization is not compatible
with this change.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c
tools/testing/radix-tree/maple.c