| From: |
| Christoph Hellwig <hch-AT-lst.de> |
| To: |
| Jens Axboe <axboe-AT-kernel.dk>, Carlos Maiolino <cem-AT-kernel.org> |
| Subject: |
| improve zoned XFS GC buffer management v3 |
| Date: |
| Tue, 13 Jan 2026 08:19:00 +0100 |
| Message-ID: |
| <20260113071912.3158268-1-hch@lst.de> |
| Cc: |
| Damien Le Moal <dlemoal-AT-kernel.org>, Hans Holmberg <hans.holmberg-AT-wdc.com>, linux-block-AT-vger.kernel.org, linux-xfs-AT-vger.kernel.org |
| Archive-link: |
| Article |
Hi all,
the zoned XFS GC code currently uses a weird bank switching strategy to
manage the scratch buffer. The reason for that was that I/O could be
proceed out of order in the early days, but that actually changed before
the code was upstreamed to avoid fragmentation. This replaced the logic
with a simple ring buffer, which makes the buffer space utilization much
more efficient.
Before that, two patches makes the reuse of the bios a lot less fragile,
and for that we need a new block layer helper that should eventually also
be useful in other places.
Jens, let me know if merging the bio helper through the XFS tree is ok.
Changes since v2:
- fix a commit message typo
- fix a missing : in the bio_reuse kerneldoc comment
- warn about bios with integrity and crypto context, and add some
documentation about this
Changes since v1:
- assert that the reused bio is not cloned, and update the comments for
bio_reuse a bit
Diffstat:
block/bio.c | 33 ++++++++++++++
fs/xfs/xfs_zone_gc.c | 113 +++++++++++++++++++++++++++------------------------
include/linux/bio.h | 1
3 files changed, 94 insertions(+), 53 deletions(-)