diff options
| author | Liam R. Howlett <[email protected]> | 2023-11-01 13:16:29 -0400 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-12-12 10:56:59 -0800 |
| commit | a3c63c8c5df6406e79490456a1fc41a287676070 (patch) | |
| tree | 0e316d42897af95acdee801e0410b89304e89a42 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 24662decdd44645e8f027d7912be962dd461d1aa (diff) | |
maple_tree: mtree_range_walk() clean up
mtree_range_walk() needed to be updated to avoid checking if there was a
pivot value. On closer examination, the code could avoid setting min or
max in certain scenarios. The commit removes the extra check for
pivot[offset] before setting max and only sets max when necessary. It
also only sets min if it is necessary by checking offset 0 prior to the
loop (as it has always done).
The commit also drops a dead node check since the end of the node will
return the array size when the last slot is occupied (by a potential reuse
in a dead node). The data will be discarded later if the node is marked
dead.
Benchmarking these changes results in an increase in performance of 5.45%
using the BENCH_WALK in the maple tree test code.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Liam R. Howlett <[email protected]>
Cc: Peng Zhang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions