acrn-kernel/fs/btrfs
Naohiro Aota f91c77d2c3 btrfs: zoned: optimize hint byte for zoned allocator
[ Upstream commit 02444f2ac26eae6385a65fcd66915084d15dffba ]

Writing sequentially to a huge file on btrfs on a SMR HDD revealed a
decline of the performance (220 MiB/s to 30 MiB/s after 500 minutes).

The performance goes down because of increased latency of the extent
allocation, which is induced by a traversing of a lot of full block groups.

So, this patch optimizes the ffe_ctl->hint_byte by choosing a block group
with sufficient size from the active block group list, which does not
contain full block groups.

After applying the patch, the performance is maintained well.

Fixes: 2eda57089e ("btrfs: zoned: implement sequential extent allocation")
CC: stable@vger.kernel.org # 5.15+
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-31 16:17:10 -08:00
..
tests btrfs: convert btrfs_block_group::needs_free_space to runtime flag 2023-08-23 17:52:28 +02:00
Kconfig
Makefile
acl.c
async-thread.c
async-thread.h
backref.c btrfs: fix resolving backrefs for inline extent followed by prealloc 2023-01-07 11:11:38 +01:00
backref.h
block-group.c btrfs: fix use-after-free of new block group that became unused 2023-08-23 17:52:29 +02:00
block-group.h btrfs: fix use-after-free of new block group that became unused 2023-08-23 17:52:29 +02:00
block-rsv.c btrfs: account block group tree when calculating global reserve size 2023-08-03 10:24:13 +02:00
block-rsv.h
btrfs_inode.h
check-integrity.c
check-integrity.h
compression.c
compression.h
ctree.c btrfs: error out when reallocating block for defrag using a stale transaction 2023-10-25 12:03:11 +02:00
ctree.h btrfs: fix infinite directory reads 2024-01-31 16:17:05 -08:00
delalloc-space.c btrfs: fix qgroup_free_reserved_data int overflow 2024-01-10 17:10:35 +01:00
delalloc-space.h
delayed-inode.c btrfs: fix infinite directory reads 2024-01-31 16:17:05 -08:00
delayed-inode.h btrfs: fix infinite directory reads 2024-01-31 16:17:05 -08:00
delayed-ref.c btrfs: prevent transaction block reserve underflow when starting transaction 2023-10-25 12:03:09 +02:00
delayed-ref.h btrfs: prevent transaction block reserve underflow when starting transaction 2023-10-25 12:03:09 +02:00
dev-replace.c
dev-replace.h
dir-item.c btrfs: use struct fscrypt_str instead of struct qstr 2023-10-10 22:00:36 +02:00
discard.c btrfs: hold block group refcount during async discard 2023-03-10 09:34:06 +01:00
discard.h
disk-io.c btrfs: add dmesg output for first mount and last unmount of a filesystem 2023-12-08 08:51:16 +01:00
disk-io.h btrfs: fix compat_ro checks against remount 2023-01-12 12:01:56 +01:00
export.c
export.h
extent-io-tree.c btrfs: fix off-by-one in delalloc search during lseek 2023-01-12 12:01:56 +01:00
extent-io-tree.h
extent-tree.c btrfs: zoned: optimize hint byte for zoned allocator 2024-01-31 16:17:10 -08:00
extent_io.c btrfs: don't clear qgroup reserved bit in release_folio 2023-12-20 17:00:26 +01:00
extent_io.h
extent_map.c btrfs: fix incorrect splitting in btrfs_drop_extent_map_range 2023-08-23 17:52:31 +02:00
extent_map.h btrfs: get the next extent map during fiemap/lseek more efficiently 2023-04-26 14:28:38 +02:00
file-item.c btrfs: mark the len field in struct btrfs_ordered_sum as unsigned 2024-01-10 17:10:35 +01:00
file.c btrfs: fix qgroup_free_reserved_data int overflow 2024-01-10 17:10:35 +01:00
free-space-cache.c btrfs: zoned: no longer count fresh BG region as zone unusable 2024-01-01 12:39:06 +00:00
free-space-cache.h
free-space-tree.c btrfs: convert btrfs_block_group::needs_free_space to runtime flag 2023-08-23 17:52:28 +02:00
free-space-tree.h btrfs: make clear_cache mount option to rebuild FST without disabling it 2023-05-17 11:53:42 +02:00
inode-item.c btrfs: use struct fscrypt_str instead of struct qstr 2023-10-10 22:00:36 +02:00
inode-item.h btrfs: use struct fscrypt_str instead of struct qstr 2023-10-10 22:00:36 +02:00
inode.c btrfs: avoid copying BTRFS_ROOT_SUBVOL_DEAD flag to snapshot of subvolume being deleted 2024-01-31 16:17:06 -08:00
ioctl.c btrfs: don't abort filesystem when attempting to snapshot deleted subvolume 2024-01-31 16:17:07 -08:00
locking.c btrfs: add block-group tree to lockdep classes 2023-07-19 16:22:13 +02:00
locking.h
lzo.c
misc.h
ordered-data.c btrfs: fix qgroup_free_reserved_data int overflow 2024-01-10 17:10:35 +01:00
ordered-data.h btrfs: mark the len field in struct btrfs_ordered_sum as unsigned 2024-01-10 17:10:35 +01:00
orphan.c
print-tree.c btrfs: print-tree: parent bytenr must be aligned to sector size 2023-05-17 11:53:42 +02:00
print-tree.h
props.c
props.h
qgroup.c btrfs: fix qgroup_free_reserved_data int overflow 2024-01-10 17:10:35 +01:00
qgroup.h btrfs: fix qgroup_free_reserved_data int overflow 2024-01-10 17:10:35 +01:00
raid56.c
raid56.h
rcu-string.h btrfs: replace strncpy() with strscpy() 2023-01-12 12:01:55 +01:00
ref-verify.c btrfs: ref-verify: free ref cache before clearing mount opt 2024-01-31 16:17:07 -08:00
ref-verify.h
reflink.c
reflink.h
relocation.c btrfs: set page extent mapped after read_folio in relocate_one_page 2023-09-19 12:28:06 +02:00
root-tree.c btrfs: use struct fscrypt_str instead of struct qstr 2023-10-10 22:00:36 +02:00
scrub.c btrfs: scrub: try harder to mark RAID56 block groups read-only 2023-06-21 16:00:52 +02:00
send.c btrfs: send: ensure send_fd is writable 2023-12-08 08:51:16 +01:00
send.h
space-info.c btrfs: zoned: re-enable metadata over-commit for zoned mode 2023-09-19 12:28:06 +02:00
space-info.h
struct-funcs.c
subpage.c
subpage.h
super.c btrfs: add dmesg output for first mount and last unmount of a filesystem 2023-12-08 08:51:16 +01:00
sysfs.c btrfs: sysfs: validate scrub_speed_max value 2024-01-31 16:16:58 -08:00
sysfs.h
transaction.c btrfs: prevent transaction block reserve underflow when starting transaction 2023-10-25 12:03:09 +02:00
transaction.h
tree-checker.c btrfs: tree-checker: fix inline ref size in error messages 2024-01-31 16:17:07 -08:00
tree-checker.h
tree-defrag.c btrfs: move the auto defrag code to defrag.c 2023-02-22 12:59:40 +01:00
tree-log.c btrfs: initialize start_slot in btrfs_log_prealloc_extents 2023-10-25 12:03:09 +02:00
tree-log.h btrfs: use struct fscrypt_str instead of struct qstr 2023-10-10 22:00:36 +02:00
tree-mod-log.c
tree-mod-log.h
ulist.c
ulist.h
uuid-tree.c
verity.c
volumes.c btrfs: make error messages more clear when getting a chunk map 2023-12-08 08:51:16 +01:00
volumes.h btrfs: add a helper to read the superblock metadata_uuid 2023-09-23 11:11:08 +02:00
xattr.c
xattr.h
zlib.c btrfs: zlib: zero-initialize zlib workspace 2023-02-14 19:11:40 +01:00
zoned.c btrfs: zoned: no longer count fresh BG region as zone unusable 2024-01-01 12:39:06 +00:00
zoned.h
zstd.c