aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMatthew Wilcox <[email protected]>2016-05-20 17:02:52 -0700
committerLinus Torvalds <[email protected]>2016-05-20 17:58:30 -0700
commit070c5ac2740b5db89d381a09fb03b2480b2f7a74 (patch)
tree1ad983222d48c155f20d6f1e03d759484e873823 /tools/perf/scripts/python/bin
parenteb73f7f3300c144c4b886dd56ea4c3d2b2d58249 (diff)
radix-tree: fix radix_tree_range_tag_if_tagged() for multiorder entries
I had previously decided that tagging a single multiorder entry would count as tagging 2^order entries for the purposes of 'nr_to_tag'. I now believe that decision to be a mistake, and it should count as a single entry. That's more likely to be what callers expect. When walking back up the tree from a newly-tagged entry, the current code assumed we were starting from the lowest level of the tree; if we have a multiorder entry with an order at least RADIX_TREE_MAP_SHIFT in size then we need to shift the index by 'shift' before we start walking back up the tree, or we will end up not setting tags on higher entries, and then mistakenly thinking that entries below a certain point in the tree are not tagged. If the first index we examine is a sibling entry of a tagged multiorder entry, we were not tagging it. We need to examine the canonical entry, and the easiest way to do that is to use radix_tree_descend(). We then have to skip over sibling slots when looking for the next entry in the tree or we will end up walking back to the canonical entry. Add several tests for radix_tree_range_tag_if_tagged(). Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Ross Zwisler <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Cc: Kirill Shutemov <[email protected]> Cc: Jan Kara <[email protected]> Cc: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions