RFC btrfs: zoned: fixes for garbage collection under preassure
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest9 patches 13 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | btrfs: zoned: do not select metadata BG as finish targetfs/ | +4 | 2 replies | |
| 2/9 | btrfs: zoned: get rid of relocation_bg_lockfs/ fs/ fs/ +1 more | +17 | 0 replies | |
| 3/9 | btrfs: zoned: get rid of treelog_bg_lockfs/ fs/ fs/ +2 more | +15 | 0 replies | |
| 4/9 | btrfs: zoned: don't hold space_info lock on zoned allocationfs/ | +0 | 0 replies | |
| 5/9 | btrfs: remove delalloc_root_mutexfs/ fs/ fs/ | +0 | 1 reply | |
| 6/9 | btrfs: remove btrfs_root's delalloc_mutexfs/ fs/ fs/ | +0 | 1 reply | |
| 7/9 | btrfs: lower auto-reclaim message log levelfs/ | +1 | 1 reply | |
| 8/9 | btrfs: lower log level of relocation messagesfs/ | +2 | 4 replies | |
| 9/9 | btrfs: remove unused bgs on allocation failurefs/ fs/ | +16 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH RFC 0/9] btrfs: zoned: fixes for garbage collection under preassure
From: Johannes Thumshirn <[email protected]>
A few weeks ago Damien started benchmarking zoned BTRFS and zoned XFS garbage collection on SMR and ZNS drives.
One of these benchmarks was filling the FS to 75% and then subsequientially overwriting the files again.
One thing that came out of these trials, is that BTRFS on ZNS devices did not finish the overwrite phase because it prematurely ran out of space.
Once I tried reclaiming earlier (patch 9/9) I've seen haning task because of extremely high lock contention on serveral locks. The patches 2 to 6 either remove these locks, or in case of the space-info lock remove unneeded lock contentiom.
Patches 7 and 8 lower the log level of reclaim messages, because with the automatic reclaim BTRFS has these days there is a lot of log spamming.
Pathch 8 triggers removal of unused block groups on allocation failure, I opted for making it non zoned specific as I think even regular filesystems can benefit from this.. The first patch from Naohiro is also needed so we don't prematurely finish metadata block groups on zoned devices.
Reasons for RFC, there are a lot of locking changes involved in this series. As much as I'm comfortable with running fio workloads and fstests, I really prefere more eyes. Especially Filipe always is a good reviewer of locking related changes and Boris for reclaiming. The series is probably not the final solution either but only forward progress, but I don't want to be running into the wrong direction.
This series also includes a previously sent series of me titled "btrfs:
zoned: reduce lock contention in zoned extent allocator" and can be found here:
https://lore.kernel.org/linux-btrfs/[email protected]/
Johannes Thumshirn (8):
btrfs: zoned: get rid of relocation_bg_lock
btrfs: zoned: get rid of treelog_bg_lock
btrfs: zoned: don't hold space_info lock on zoned allocation
btrfs: remove delalloc_root_mutex
btrfs: remove btrfs_root's delalloc_mutex
btrfs: lower auto-reclaim message log level
btrfs: lower log level of relocation messages
btrfs: remove unused bgs on allocation failure
Naohiro Aota (1):
btrfs: zoned: do not select metadata BG as finish target
fs/btrfs/block-group.c | 2 +- fs/btrfs/block-group.h | 11 ++++++ fs/btrfs/ctree.h | 1 - fs/btrfs/disk-io.c | 4 --- fs/btrfs/extent-tree.c | 81 ++++++++++++++---------------------------- fs/btrfs/fs.h | 8 +---- fs/btrfs/inode.c | 4 --- fs/btrfs/relocation.c | 4 +-- fs/btrfs/zoned.c | 19 +++++----- fs/btrfs/zoned.h | 7 ++-- 10 files changed, 55 insertions(+), 86 deletions(-)
Signature · 1 line
2.49.0