diff options
Diffstat (limited to 'tools/testing/radix-tree/test.h')
-rw-r--r-- | tools/testing/radix-tree/test.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tools/testing/radix-tree/test.h b/tools/testing/radix-tree/test.h index 217fb2403f09..056a23b56467 100644 --- a/tools/testing/radix-tree/test.h +++ b/tools/testing/radix-tree/test.h | |||
@@ -5,11 +5,11 @@ | |||
5 | 5 | ||
6 | struct item { | 6 | struct item { |
7 | unsigned long index; | 7 | unsigned long index; |
8 | unsigned int order; | ||
8 | }; | 9 | }; |
9 | 10 | ||
10 | struct item *item_create(unsigned long index); | 11 | struct item *item_create(unsigned long index, unsigned int order); |
11 | int __item_insert(struct radix_tree_root *root, struct item *item, | 12 | int __item_insert(struct radix_tree_root *root, struct item *item); |
12 | unsigned order); | ||
13 | int item_insert(struct radix_tree_root *root, unsigned long index); | 13 | int item_insert(struct radix_tree_root *root, unsigned long index); |
14 | int item_insert_order(struct radix_tree_root *root, unsigned long index, | 14 | int item_insert_order(struct radix_tree_root *root, unsigned long index, |
15 | unsigned order); | 15 | unsigned order); |
@@ -25,9 +25,15 @@ void item_full_scan(struct radix_tree_root *root, unsigned long start, | |||
25 | unsigned long nr, int chunk); | 25 | unsigned long nr, int chunk); |
26 | void item_kill_tree(struct radix_tree_root *root); | 26 | void item_kill_tree(struct radix_tree_root *root); |
27 | 27 | ||
28 | int tag_tagged_items(struct radix_tree_root *, pthread_mutex_t *, | ||
29 | unsigned long start, unsigned long end, unsigned batch, | ||
30 | unsigned iftag, unsigned thentag); | ||
31 | unsigned long find_item(struct radix_tree_root *, void *item); | ||
32 | |||
28 | void tag_check(void); | 33 | void tag_check(void); |
29 | void multiorder_checks(void); | 34 | void multiorder_checks(void); |
30 | void iteration_test(void); | 35 | void iteration_test(unsigned order, unsigned duration); |
36 | void benchmark(void); | ||
31 | 37 | ||
32 | struct item * | 38 | struct item * |
33 | item_tag_set(struct radix_tree_root *root, unsigned long index, int tag); | 39 | item_tag_set(struct radix_tree_root *root, unsigned long index, int tag); |
@@ -40,7 +46,14 @@ void verify_tag_consistency(struct radix_tree_root *root, unsigned int tag); | |||
40 | extern int nr_allocated; | 46 | extern int nr_allocated; |
41 | 47 | ||
42 | /* Normally private parts of lib/radix-tree.c */ | 48 | /* Normally private parts of lib/radix-tree.c */ |
49 | struct radix_tree_node *entry_to_node(void *ptr); | ||
43 | void radix_tree_dump(struct radix_tree_root *root); | 50 | void radix_tree_dump(struct radix_tree_root *root); |
44 | int root_tag_get(struct radix_tree_root *root, unsigned int tag); | 51 | int root_tag_get(struct radix_tree_root *root, unsigned int tag); |
45 | unsigned long node_maxindex(struct radix_tree_node *); | 52 | unsigned long node_maxindex(struct radix_tree_node *); |
46 | unsigned long shift_maxindex(unsigned int shift); | 53 | unsigned long shift_maxindex(unsigned int shift); |
54 | int radix_tree_cpu_dead(unsigned int cpu); | ||
55 | struct radix_tree_preload { | ||
56 | unsigned nr; | ||
57 | struct radix_tree_node *nodes; | ||
58 | }; | ||
59 | extern struct radix_tree_preload radix_tree_preloads; | ||