diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-09-22 11:39:07 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-10-12 16:44:15 +0200 |
commit | 63ffc1f7c492df977353a0d2adf01d41069aad68 (patch) | |
tree | 596b1938bfab9587339fa4c70b1edea59ee3ba64 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | df2a8e70c3c397d4780027be3151d3c3ae9d47a6 (diff) |
btrfs: make tree iteration in extent_io_tree_release() more efficient
Currently extent_io_tree_release() is a loop that keeps getting the first
node in the io tree, using rb_first() which is a loop that gets to the
leftmost node of the rbtree, and then for each node it calls rb_erase(),
which often requires rebalancing the rbtree.
We can make this more efficient by using
rbtree_postorder_for_each_entry_safe() to free each node without having
to delete it from the rbtree and without looping to get the first node.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions