Skip to content

btrfs: allocator perf improvements

Boris Burkov linux-btrfs 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 0 repliesNew
  2. v16 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- removed data_rwsem and delalloc_bytes from block_group and find_free_extent()

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7btrfs: skip unhelpful size class relaxing allocation loopsfs/btrfs/extent-tree.c fs/btrfs/extent-tree.h+14 -10 replies
2/7btrfs: don't take block group references in find_free_extent()fs/btrfs/extent-tree.c+14 -90 replies
3/7btrfs: remove redundant checks in find_free_extent() hint pathfs/btrfs/extent-tree.c+5 -80 replies
4/7btrfs: factor the find_free_extent() block group skip into a helperfs/btrfs/extent-tree.c+13 -80 replies
5/7btrfs: find_free_extent checks full block groups unlockedfs/btrfs/extent-tree.c+17 -10 replies
6/7btrfs: find_free_extent checks size class unlockedfs/btrfs/extent-tree.c+3 -00 replies
7/7btrfs: remove block_group data_rwsem and delalloc_bytesfs/btrfs/block-group.c fs/btrfs/block-group.h fs/btrfs/direct-io.c +5 more+43 -1430 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/7] btrfs: allocator perf improvements

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

https://lore.kernel.org/linux-btrfs/[email protected]/T/#t
and
https://lore.kernel.org/linux-btrfs/[email protected]/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(-)
Signature · 1 line
2.56.0