summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2023-11-03 16:09:36 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-11-05 05:19:13 +0300
commit2a4e7497604b20b19b6d9dbd109c42900892d7c9 (patch)
treeae47393656f2e99a2b4c7cf309a7432de142f7a2 /fs/bcachefs/alloc_background.c
parent0e91d3a6d59ed3c6630c7c50f17534f2b02d2abf (diff)
downloadlinux-2a4e7497604b20b19b6d9dbd109c42900892d7c9.tar.xz
bcachefs: allow writeback to fill bio completely
The bcachefs folio writeback code includes a bio full check as well as a fixed size check to determine when to split off and submit writeback I/O. The inclusive check of the latter against the limit means that writeback can submit slightly prematurely. This is not a functional problem, but results in unnecessarily split I/Os and extent merging. This can be observed with a buffered write sized exactly to the current maximum value (1MB) and with key_merging_disabled=1. The latter prevents the merge from the second write such that a subsequent check of the extent list shows a 1020k extent followed by a contiguous 4k extent. The purpose for the fixed size check is also undocumented and somewhat obscure. Lift this check into a new helper that wraps the bio check, fix the comparison logic, and add a comment to document the purpose and how we might improve on this in the future. Signed-off-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
0 files changed, 0 insertions, 0 deletions