Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/7] btrfs: allocator perf improvements
@ 2026-10-22 17:06 Boris Burkov
  2026-10-22 17:06 ` [PATCH v2 1/7] btrfs: skip unhelpful size class relaxing allocation loops Boris Burkov
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Boris Burkov @ 2026-10-22 17:06 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

Working on the bugs to do with large fs-es and unused block groups

https://lore.kernel.org/linux-btrfs/20260916230447.GA1706558@zen.localdomain/T/#t
and
https://lore.kernel.org/linux-btrfs/cover.1790641111.git.boris@bur.io/T/#t

revealed some low hanging fruit in allocation performance for very large
mostly full fs-es. The gist is to try to skip unnecessary operations per block
group which adds up with 10s of thousands of obviously skippable block
groups. Running 20k fallocates in a loop on a sparse file fs improved from
~40s to ~7s.

Changelog:
v2:
- removed data_rwsem and delalloc_bytes from block_group and find_free_extent()


Boris Burkov (7):
  btrfs: skip unhelpful size class relaxing allocation loops
  btrfs: don't take block group references in find_free_extent()
  btrfs: remove redundant checks in find_free_extent() hint path
  btrfs: factor the find_free_extent() block group skip into a helper
  btrfs: find_free_extent checks full block groups unlocked
  btrfs: find_free_extent checks size class unlocked
  btrfs: remove block_group data_rwsem and delalloc_bytes

 fs/btrfs/block-group.c |  12 +--
 fs/btrfs/block-group.h |  13 +---
 fs/btrfs/direct-io.c   |   4 +-
 fs/btrfs/extent-tree.c | 166 +++++++++++++++++------------------------
 fs/btrfs/extent-tree.h |   9 ++-
 fs/btrfs/inode.c       |  36 +++------
 fs/btrfs/relocation.c  |  16 ++--
 fs/btrfs/space-info.c  |   5 +-
 8 files changed, 100 insertions(+), 161 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-10-22 17:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 17:06 [PATCH v2 0/7] btrfs: allocator perf improvements Boris Burkov
2026-10-22 17:06 ` [PATCH v2 1/7] btrfs: skip unhelpful size class relaxing allocation loops Boris Burkov
2026-10-22 17:07 ` [PATCH v2 2/7] btrfs: don't take block group references in find_free_extent() Boris Burkov
2026-10-22 17:07 ` [PATCH v2 3/7] btrfs: remove redundant checks in find_free_extent() hint path Boris Burkov
2026-10-22 17:07 ` [PATCH v2 4/7] btrfs: factor the find_free_extent() block group skip into a helper Boris Burkov
2026-10-22 17:07 ` [PATCH v2 5/7] btrfs: find_free_extent checks full block groups unlocked Boris Burkov
2026-10-22 17:07 ` [PATCH v2 6/7] btrfs: find_free_extent checks size class unlocked Boris Burkov
2026-10-22 17:07 ` [PATCH v2 7/7] btrfs: remove block_group data_rwsem and delalloc_bytes Boris Burkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox