From cfa40bcfd6fed7010b1633bf127ed8571d3b607e Mon Sep 17 00:00:00 2001 From: Konstantin Khlebnikov Date: Wed, 14 Dec 2016 15:08:14 -0800 Subject: radix tree test suite: benchmark for iterator This adds simple benchmark for iterator similar to one I've used for commit 78c1d78488a3 ("radix-tree: introduce bit-optimized iterator") Building with make BENCHMARK=1 set radix tree order to 6, this allows to get performance comparable to in kernel performance. Link: http://lkml.kernel.org/r/1480369871-5271-43-git-send-email-mawilcox@linuxonhyperv.com Signed-off-by: Konstantin Khlebnikov Signed-off-by: Matthew Wilcox Tested-by: Kirill A. Shutemov Cc: Ross Zwisler Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- tools/testing/radix-tree/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/testing/radix-tree/main.c') diff --git a/tools/testing/radix-tree/main.c b/tools/testing/radix-tree/main.c index 2eb694994497..f1d1e3bd9464 100644 --- a/tools/testing/radix-tree/main.c +++ b/tools/testing/radix-tree/main.c @@ -352,6 +352,8 @@ int main(int argc, char **argv) /* Free any remaining preallocated nodes */ radix_tree_cpu_dead(0); + benchmark(); + sleep(1); printf("after sleep(1): %d allocated, preempt %d\n", nr_allocated, preempt_count); -- cgit v1.2.3-59-g8ed1b