| From: |
| fdmanana-AT-kernel.org |
| To: |
| linux-btrfs-AT-vger.kernel.org |
| Subject: |
| [PATCH 00/28] btrfs: some small optimizations around space_info locking and cleanups |
| Date: |
| Thu, 23 Oct 2025 16:59:33 +0100 |
| Message-ID: |
| <cover.1761234580.git.fdmanana@suse.com> |
| Archive-link: |
| Article |
From: Filipe Manana <fdmanana@suse.com>
Several optimizations to reduce critical sections delimited by a
space_info's spinlock and several cleanups mostly arround space
reservation and flushing. Details in the changelogs.
Filipe Manana (28):
btrfs: return real error when failing tickets in maybe_fail_all_tickets()
btrfs: avoid recomputing used space in btrfs_try_granting_tickets()
btrfs: make btrfs_can_overcommit() return bool instead of int
btrfs: avoid used space computation when trying to grant tickets
btrfs: avoid used space computation when reserving space
btrfs: inline btrfs_space_info_used()
btrfs: bail out earlier from need_preemptive_reclaim() if we have tickets
btrfs: increment loop count outside critical section during metadata reclaim
btrfs: shorten critical section in btrfs_preempt_reclaim_metadata_space()
btrfs: avoid unnecessary reclaim calculation in priority_reclaim_metadata_space()
btrfs: assert space_info is locked in steal_from_global_rsv()
btrfs: assign booleans to global reserve's full field
btrfs: process ticket outside global reserve critical section
btrfs: remove double underscore prefix from __reserve_bytes()
btrfs: reduce space_info critical section in btrfs_chunk_alloc()
btrfs: reduce block group critical section in btrfs_free_reserved_bytes()
btrfs: reduce block group critical section in btrfs_add_reserved_bytes()
btrfs: reduce block group critical section in do_trimming()
btrfs: reduce block group critical section in pin_down_extent()
btrfs: use local variable for space_info in pin_down_extent()
btrfs: remove 'reserved' argument from btrfs_pin_extent()
btrfs: change 'reserved' argument from pin_down_extent() to bool
btrfs: reduce block group critical section in unpin_extent_range()
btrfs: remove pointless label and goto from unpin_extent_range()
btrfs: add data_race() in btrfs_account_ro_block_groups_free_space()
btrfs: move ticket wakeup and finalization to remove_ticket()
btrfs: avoid space_info locking when checking if tickets are served
btrfs: tag as unlikely fs aborted checks in space flushing code
fs/btrfs/block-group.c | 41 +++---
fs/btrfs/extent-tree.c | 72 ++++++-----
fs/btrfs/extent-tree.h | 3 +-
fs/btrfs/free-space-cache.c | 20 +--
fs/btrfs/space-info.c | 243 +++++++++++++++++++-----------------
fs/btrfs/space-info.h | 18 ++-
6 files changed, 219 insertions(+), 178 deletions(-)
--
2.47.2