linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* improve zoned XFS GC buffer management
@ 2025-12-18  6:31 Christoph Hellwig
  2025-12-18  6:31 ` [PATCH 1/3] block: add a bio_reuse helper Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Christoph Hellwig @ 2025-12-18  6:31 UTC (permalink / raw)
  To: Jens Axboe, Carlos Maiolino
  Cc: Damien Le Moal, Hans Holmberg, linux-block, linux-xfs

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 this through the
XFS tree is ok.


Diffstat:
 block/bio.c          |   25 +++++++++++
 fs/xfs/xfs_zone_gc.c |  113 +++++++++++++++++++++++++++------------------------
 include/linux/bio.h  |    1 
 3 files changed, 86 insertions(+), 53 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread
* improve zoned XFS GC buffer management v2
@ 2026-01-06  7:58 Christoph Hellwig
  2026-01-06  7:58 ` [PATCH 1/3] block: add a bio_reuse helper Christoph Hellwig
  0 siblings, 1 reply; 15+ messages in thread
From: Christoph Hellwig @ 2026-01-06  7:58 UTC (permalink / raw)
  To: Jens Axboe, Carlos Maiolino
  Cc: Damien Le Moal, Hans Holmberg, linux-block, linux-xfs

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 v1:
 - assert that the reused bio is not cloned, and update the comments for
   bio_reuse a bit

Diffstat:
 block/bio.c          |   29 +++++++++++++
 fs/xfs/xfs_zone_gc.c |  113 +++++++++++++++++++++++++++------------------------
 include/linux/bio.h  |    1 
 3 files changed, 90 insertions(+), 53 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-01-06  7:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-18  6:31 improve zoned XFS GC buffer management Christoph Hellwig
2025-12-18  6:31 ` [PATCH 1/3] block: add a bio_reuse helper Christoph Hellwig
2025-12-18  6:43   ` Damien Le Moal
2025-12-18  9:20   ` Hannes Reinecke
2025-12-18  9:35     ` Christoph Hellwig
2025-12-18  9:40   ` Ming Lei
2025-12-18  9:45     ` Christoph Hellwig
2025-12-19  7:45   ` Hans Holmberg
2025-12-18  6:31 ` [PATCH 2/3] xfs: use bio_reuse in the zone GC code Christoph Hellwig
2025-12-18  6:45   ` Damien Le Moal
2025-12-19  7:48   ` Hans Holmberg
2025-12-18  6:31 ` [PATCH 3/3] xfs: rework zone GC buffer management Christoph Hellwig
2025-12-18  7:12   ` Damien Le Moal
2025-12-19  8:06   ` Hans Holmberg
  -- strict thread matches above, loose matches on Subject: below --
2026-01-06  7:58 improve zoned XFS GC buffer management v2 Christoph Hellwig
2026-01-06  7:58 ` [PATCH 1/3] block: add a bio_reuse helper Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).