]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: don't find node end in mtree_lookup_walk()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 1 Nov 2023 17:16:28 +0000 (13:16 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 20 Nov 2023 21:16:24 +0000 (13:16 -0800)
commit763b2c97d00783e0813987b49eb2d664a2490c10
tree39383905cf8fc0565f75dfea9abc8dd180bb7e30
parentcdd46b58ba3e20e3b0a749ef774c198cebbf0f30
maple_tree: don't find node end in mtree_lookup_walk()

Since the pivot being set is now reliable, the optimized loop no longer
needs to find the node end.  The redundant check for a dead node can also
be avoided as there is no danger of using the wrong pivot since the
results will be thrown out in the case of a dead node by the later check.

This patch also adds a benchmark test for the function to the maple tree
test framework.  The benchmark shows an average increase performance of
5.98% over 3 runs with this commit.

Link: https://lkml.kernel.org/r/20231101171629.3612299-12-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Peng Zhang <zhangpeng.00@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c
lib/test_maple_tree.c