aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2025-04-09 17:15:35 +0100
committerDavid Sterba <dsterba@suse.com>2025-05-15 14:30:51 +0200
commit6c28102f9ac4eea321e5421c248ca17983a9760d (patch)
tree6169abb0139d47e388a6ec9390454b55cf2b444e /tools/perf/scripts/python/export-to-postgresql.py
parentbtrfs: use bools for local variables at btrfs_clear_extent_bit_changeset() (diff)
downloadlinux-rng-6c28102f9ac4eea321e5421c248ca17983a9760d.tar.xz
linux-rng-6c28102f9ac4eea321e5421c248ca17983a9760d.zip
btrfs: avoid extra tree search at btrfs_clear_extent_bit_changeset()
When we find an extent state that starts before our range's start we split it and jump into the 'search_again' label with our start offset remaining the same, making us then go to the 'again' label and search again for an extent state that contains the 'start' offset, and this time it finds the same extent state but with its start offset set to our range's start offset (due to the split). This is because we have consumed the preallocated extent state record and we may need to split again, and by jumping to 'again' we release the spinlock, allocate a new prealloc state and restart the search. However we may not need to restart and allocate a new extent state in case we don't find extent states that cross our end offset, therefore no need for further extent state splits, or we may be able to do an atomic allocation (which is quick even if it fails). In these cases it's a waste to restart the search. So change the behaviour to do the restart only if we need to reschedule, otherwise fall through - if we need to allocate an extent state for split operations, we will try an atomic allocation and if that fails we will do the restart as before. 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