aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/test.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-14 20:25:18 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-14 20:25:18 -0500
commita57cb1c1d7974c62a5c80f7869e35b492ace12cd (patch)
tree5a42ee9a668f171143464bc86013954c1bbe94ad /tools/testing/radix-tree/test.h
parentcf1b3341afab9d3ad02a76b3a619ea027dcf4e28 (diff)
parente1e14ab8411df344a17687821f8f78f0a1e73cbb (diff)
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: - a few misc things - kexec updates - DMA-mapping updates to better support networking DMA operations - IPC updates - various MM changes to improve DAX fault handling - lots of radix-tree changes, mainly to the test suite. All leading up to reimplementing the IDA/IDR code to be a wrapper layer over the radix-tree. However the final trigger-pulling patch is held off for 4.11. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (114 commits) radix tree test suite: delete unused rcupdate.c radix tree test suite: add new tag check radix-tree: ensure counts are initialised radix tree test suite: cache recently freed objects radix tree test suite: add some more functionality idr: reduce the number of bits per level from 8 to 6 rxrpc: abstract away knowledge of IDR internals tpm: use idr_find(), not idr_find_slowpath() idr: add ida_is_empty radix tree test suite: check multiorder iteration radix-tree: fix replacement for multiorder entries radix-tree: add radix_tree_split_preload() radix-tree: add radix_tree_split radix-tree: add radix_tree_join radix-tree: delete radix_tree_range_tag_if_tagged() radix-tree: delete radix_tree_locate_item() radix-tree: improve multiorder iterators btrfs: fix race in btrfs_free_dummy_fs_info() radix-tree: improve dump output radix-tree: make radix_tree_find_next_bit more useful ...
Diffstat (limited to 'tools/testing/radix-tree/test.h')
-rw-r--r--tools/testing/radix-tree/test.h21
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
6struct item { 6struct item {
7 unsigned long index; 7 unsigned long index;
8 unsigned int order;
8}; 9};
9 10
10struct item *item_create(unsigned long index); 11struct item *item_create(unsigned long index, unsigned int order);
11int __item_insert(struct radix_tree_root *root, struct item *item, 12int __item_insert(struct radix_tree_root *root, struct item *item);
12 unsigned order);
13int item_insert(struct radix_tree_root *root, unsigned long index); 13int item_insert(struct radix_tree_root *root, unsigned long index);
14int item_insert_order(struct radix_tree_root *root, unsigned long index, 14int 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);
26void item_kill_tree(struct radix_tree_root *root); 26void item_kill_tree(struct radix_tree_root *root);
27 27
28int tag_tagged_items(struct radix_tree_root *, pthread_mutex_t *,
29 unsigned long start, unsigned long end, unsigned batch,
30 unsigned iftag, unsigned thentag);
31unsigned long find_item(struct radix_tree_root *, void *item);
32
28void tag_check(void); 33void tag_check(void);
29void multiorder_checks(void); 34void multiorder_checks(void);
30void iteration_test(void); 35void iteration_test(unsigned order, unsigned duration);
36void benchmark(void);
31 37
32struct item * 38struct item *
33item_tag_set(struct radix_tree_root *root, unsigned long index, int tag); 39item_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);
40extern int nr_allocated; 46extern int nr_allocated;
41 47
42/* Normally private parts of lib/radix-tree.c */ 48/* Normally private parts of lib/radix-tree.c */
49struct radix_tree_node *entry_to_node(void *ptr);
43void radix_tree_dump(struct radix_tree_root *root); 50void radix_tree_dump(struct radix_tree_root *root);
44int root_tag_get(struct radix_tree_root *root, unsigned int tag); 51int root_tag_get(struct radix_tree_root *root, unsigned int tag);
45unsigned long node_maxindex(struct radix_tree_node *); 52unsigned long node_maxindex(struct radix_tree_node *);
46unsigned long shift_maxindex(unsigned int shift); 53unsigned long shift_maxindex(unsigned int shift);
54int radix_tree_cpu_dead(unsigned int cpu);
55struct radix_tree_preload {
56 unsigned nr;
57 struct radix_tree_node *nodes;
58};
59extern struct radix_tree_preload radix_tree_preloads;