aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2020-10-09 09:28:25 -0400
committerDavid Sterba <dsterba@suse.com>2021-02-08 22:58:58 +0100
commit9f42d37748264d65ca611b60c22b9c003030b0b3 (patch)
tree082d097133a84b231b6f2a63708c7c16ac705323 /tools/perf/scripts/python/exported-sql-viewer.py
parentbtrfs: check reclaim_size in need_preemptive_reclaim (diff)
downloadlinux-dev-9f42d37748264d65ca611b60c22b9c003030b0b3.tar.xz
linux-dev-9f42d37748264d65ca611b60c22b9c003030b0b3.zip
btrfs: rework btrfs_calc_reclaim_metadata_size
Currently btrfs_calc_reclaim_metadata_size does two things, it returns the space currently required for flushing by the tickets, and if there are no tickets it calculates a value for the preemptive flushing. However for the normal ticketed flushing we really only care about the space required for tickets. We will accidentally come in and flush one time, but as soon as we see there are no tickets we bail out of our flushing. Fix this by making btrfs_calc_reclaim_metadata_size really only tell us what is required for flushing if we have people waiting on space. Then move the preemptive flushing logic into need_preemptive_reclaim(). We ignore btrfs_calc_reclaim_metadata_size() in need_preemptive_reclaim() because if we are in this path then we made our reservation and there are not pending tickets currently, so we do not need to check it, simply do the fuzzy logic to check if we're getting low on space. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions