aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2024-07-25 10:46:01 +0100
committerDavid Sterba <dsterba@suse.com>2024-09-10 16:51:17 +0200
commitb79f1c2caadc5c6251241977c7987fefdeadc2d9 (patch)
tree807dafa61ed77a8eed611a769536e6be55953b59 /tools/perf/scripts/python/export-to-postgresql.py
parentbtrfs: convert extent_range_clear_dirty_for_io() to use a folio (diff)
downloadwireguard-linux-b79f1c2caadc5c6251241977c7987fefdeadc2d9.tar.xz
wireguard-linux-b79f1c2caadc5c6251241977c7987fefdeadc2d9.zip
btrfs: reschedule when updating chunk maps at the end of a device replace
At the end of a device replace we must go over all the chunk maps and update their stripes to point to the target device instead of the source device. We iterate over the chunk maps while holding a write lock and we never reschedule, which can result in monopolizing a CPU for too long and blocking readers for too long (it's a rw lock, non-blocking). So improve on this by rescheduling if necessary. This is safe because at this point we are holding the chunk mutex, which means no new chunks can be allocated and therefore we don't risk missing a new chunk map that covers a range behind the last one we processed before rescheduling. 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