summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorSidhartha Kumar <sidhartha.kumar@oracle.com>2025-04-10 19:14:42 +0000
committerAndrew Morton <akpm@linux-foundation.org>2025-05-11 17:48:28 -0700
commitf9d3a963fef4d3377b7ee122408cf2cdf37b3181 (patch)
tree054d3b334a67eb9e6068249fbef4381a0d97068e /tools/perf/scripts/python
parent28092a652f9c17773aa6ca0f62f73738d756b914 (diff)
downloadlinux-f9d3a963fef4d3377b7ee122408cf2cdf37b3181.tar.gz
linux-f9d3a963fef4d3377b7ee122408cf2cdf37b3181.zip
maple_tree: use height and depth consistently
For the maple tree, the root node is defined to have a depth of 0 with a height of 1. Each level down from the node, these values are incremented by 1. Various code paths define a root with depth 1 which is inconsisent with the definition. Modify the code to be consistent with this definition. In mas_spanning_rebalance(), l_mas.depth was being used to track the height based on the number of iterations done in the main loop. This information was then used in mas_put_in_tree() to set the height. Rather than overload the l_mas.depth field to track height, simply keep track of height in the local variable new_height and directly pass this to mas_wmb_replace() which will be passed into mas_put_in_tree(). This allows up to remove writes to l_mas.depth. Link: https://lkml.kernel.org/r/20250410191446.2474640-3-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions