aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/radix-tree
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@oracle.com>2023-11-01 13:16:21 -0400
committerAndrew Morton <akpm@linux-foundation.org>2023-12-12 10:56:57 -0800
commit31c532a8af57513228c2b12d281104198ff412b8 (patch)
tree65f5d2a57b8210106fc092bd9ac49492e62070ca /tools/testing/radix-tree
parentmaple_tree: move debug check to __mas_set_range() (diff)
downloadwireguard-linux-31c532a8af57513228c2b12d281104198ff412b8.tar.xz
wireguard-linux-31c532a8af57513228c2b12d281104198ff412b8.zip
maple_tree: add end of node tracking to the maple state
Analysis of the mas_for_each() iteration showed that there is a significant time spent finding the end of a node. This time can be greatly reduced if the end of the node is cached in the maple state. Care must be taken to update & invalidate as necessary. Link: https://lkml.kernel.org/r/20231101171629.3612299-5-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>
Diffstat (limited to 'tools/testing/radix-tree')
-rw-r--r--tools/testing/radix-tree/maple.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c
index cb5358674521..7095fb0ec026 100644
--- a/tools/testing/radix-tree/maple.c
+++ b/tools/testing/radix-tree/maple.c
@@ -945,6 +945,7 @@ retry:
goto retry;
}
+ mas->end = mas_data_end(mas);
return ret;
not_found: