diff options
| author | Matthew Wilcox <[email protected]> | 2016-12-14 23:08:55 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-12-15 00:04:10 +0000 |
| commit | 268f42de718128cd0301293177e79c08c38e39a6 (patch) | |
| tree | 6668c85388c327f64ce9b51e77d70e245ec52b57 /tools/testing/radix-tree/test.h | |
| parent | radix-tree: delete radix_tree_locate_item() (diff) | |
| download | kernel-268f42de718128cd0301293177e79c08c38e39a6.tar.gz kernel-268f42de718128cd0301293177e79c08c38e39a6.zip | |
radix-tree: delete radix_tree_range_tag_if_tagged()
This is an exceptionally complicated function with just one caller
(tag_pages_for_writeback). We devote a large portion of the runtime of
the test suite to testing this one function which has one caller. By
introducing the new function radix_tree_iter_tag_set(), we can eliminate
all of the complexity while keeping the performance. The caller can now
use a fairly standard radix_tree_for_each() loop, and it doesn't need to
worry about tricksy things like 'start' wrapping.
The test suite continues to spend a large amount of time investigating
this function, but now it's testing the underlying primitives such as
radix_tree_iter_resume() and the radix_tree_for_each_tagged() iterator
which are also used by other parts of the kernel.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Matthew Wilcox <[email protected]>
Tested-by: Kirill A. Shutemov <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Cc: Ross Zwisler <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/testing/radix-tree/test.h')
| -rw-r--r-- | tools/testing/radix-tree/test.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/radix-tree/test.h b/tools/testing/radix-tree/test.h index 3d9d1d30da22..e11e4d260b4e 100644 --- a/tools/testing/radix-tree/test.h +++ b/tools/testing/radix-tree/test.h @@ -25,6 +25,9 @@ void item_full_scan(struct radix_tree_root *root, unsigned long start, unsigned long nr, int chunk); void item_kill_tree(struct radix_tree_root *root); +int tag_tagged_items(struct radix_tree_root *, pthread_mutex_t *, + unsigned long start, unsigned long end, unsigned batch, + unsigned iftag, unsigned thentag); unsigned long find_item(struct radix_tree_root *, void *item); void tag_check(void); |
