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/1480369871-5271-57-git-send-email-mawilcox@linuxonhyperv.com Signed-off-by:Matthew Wilcox <willy@infradead.org> Tested-by:
Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- include/linux/radix-tree.h 37 additions, 37 deletionsinclude/linux/radix-tree.h
- lib/radix-tree.c 20 additions, 97 deletionslib/radix-tree.c
- mm/page-writeback.c 18 additions, 10 deletionsmm/page-writeback.c
- tools/testing/radix-tree/main.c 4 additions, 8 deletionstools/testing/radix-tree/main.c
- tools/testing/radix-tree/multiorder.c 5 additions, 8 deletionstools/testing/radix-tree/multiorder.c
- tools/testing/radix-tree/regression2.c 2 additions, 1 deletiontools/testing/radix-tree/regression2.c
- tools/testing/radix-tree/tag_check.c 2 additions, 2 deletionstools/testing/radix-tree/tag_check.c
- tools/testing/radix-tree/test.c 34 additions, 0 deletionstools/testing/radix-tree/test.c
- tools/testing/radix-tree/test.h 3 additions, 0 deletionstools/testing/radix-tree/test.h
Please register or sign in to comment