Skip to content

btrfs: avoid some block group rbtree lock contention

[email protected] linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5btrfs: remove search start argument from first_logical_byte()fs/btrfs/extent-tree.c+4 -30 replies
2/5btrfs: use rbtree with leftmost node cached for tracking lowest block groupfs/btrfs/block-group.c fs/btrfs/ctree.h fs/btrfs/disk-io.c +3 more+25 -370 replies
3/5btrfs: use a read/write lock for protecting the block groups treefs/btrfs/block-group.c fs/btrfs/ctree.h fs/btrfs/disk-io.c +2 more+26 -260 replies
4/5btrfs: return block group directly at btrfs_next_block_group()fs/btrfs/block-group.c+1 -10 replies
5/5btrfs: avoid double search for block group during NOCOW writesfs/btrfs/block-group.c fs/btrfs/block-group.h fs/btrfs/inode.c+60 -290 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNikolay Borisov
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] btrfs: avoid some block group rbtree lock contention

From: Filipe Manana <[email protected]>

This patchset allows for better concurrency when accessing the red black tree of block groups, which is used very frequently and most accesses are read-only, as well as avoid some unnecessary searches in the tree during NOCOW writes. Details in the changelogs.

Filipe Manana (5):
btrfs: remove search start argument from first_logical_byte()
btrfs: use rbtree with leftmost node cached for tracking lowest block group
btrfs: use a read/write lock for protecting the block groups tree
btrfs: return block group directly at btrfs_next_block_group()
btrfs: avoid double search for block group during NOCOW writes

 fs/btrfs/block-group.c      | 130 ++++++++++++++++++++----------------
 fs/btrfs/block-group.h      |   5 +-
 fs/btrfs/ctree.h            |   5 +-
 fs/btrfs/disk-io.c          |   5 +-
 fs/btrfs/extent-tree.c      |  29 ++++----
 fs/btrfs/free-space-cache.c |   2 +-
 fs/btrfs/free-space-tree.c  |   2 +-
 fs/btrfs/inode.c            |  26 +++++---
 fs/btrfs/transaction.c      |   4 +-
 9 files changed, 114 insertions(+), 94 deletions(-)
Signature · 1 line
2.35.1