diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-10-17 19:07:22 +0300 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-25 00:09:46 +0300 |
| commit | 4ddb077378aa84d0872fdfce85e7a82fd805ee86 (patch) | |
| tree | 7c8b9df591c9729699b0b85035d35852b76b2991 /include/linux/execmem.h | |
| parent | 8ab2b8bdbecaaf1b01adc5cfc13534a04917515d (diff) | |
| download | linux-4ddb077378aa84d0872fdfce85e7a82fd805ee86.tar.xz | |
btrfs: shorten critical section in btrfs_preempt_reclaim_metadata_space()
We are doing a lot of small calculations and assignments while holding the
space_info's spinlock, which is a heavily used lock for space reservation
and flushing. There's no point in holding the lock for so long when all we
want is to call need_preemptive_reclaim() and get a consistent value for a
couple of counters from the space_info. Instead, grab the counters into
local variables, release the lock and then use the local variables.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
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 'include/linux/execmem.h')
0 files changed, 0 insertions, 0 deletions
