public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* improve zoned XFS GC buffer management v3
@ 2026-01-13  7:19 Christoph Hellwig
  2026-01-13  7:19 ` [PATCH 1/3] block: add a bio_reuse helper Christoph Hellwig
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Christoph Hellwig @ 2026-01-13  7:19 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 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(-)

^ permalink raw reply	[flat|nested] 16+ messages in thread
* improve zoned XFS GC buffer management v4
@ 2026-01-14 13:06 Christoph Hellwig
  2026-01-14 13:06 ` [PATCH 2/3] xfs: use bio_reuse in the zone GC code Christoph Hellwig
  0 siblings, 1 reply; 16+ messages in thread
From: Christoph Hellwig @ 2026-01-14 13:06 UTC (permalink / raw)
  To: Jens Axboe, Carlos Maiolino
  Cc: Damien Le Moal, Hans Holmberg, Keith Busch, 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.

Changes since v3:
 - pass an op to bio_reuse and fix GC on conventional zones/devices

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          |   34 +++++++++++++++
 fs/xfs/xfs_zone_gc.c |  113 +++++++++++++++++++++++++++------------------------
 include/linux/bio.h  |    1 
 3 files changed, 95 insertions(+), 53 deletions(-)

^ permalink raw reply	[flat|nested] 16+ messages in thread
* improve zoned XFS GC buffer management v2
@ 2026-01-06  7:58 Christoph Hellwig
  2026-01-06  7:58 ` [PATCH 2/3] xfs: use bio_reuse in the zone GC code Christoph Hellwig
  0 siblings, 1 reply; 16+ 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] 16+ messages in thread
* improve zoned XFS GC buffer management
@ 2025-12-18  6:31 Christoph Hellwig
  2025-12-18  6:31 ` [PATCH 2/3] xfs: use bio_reuse in the zone GC code Christoph Hellwig
  0 siblings, 1 reply; 16+ 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] 16+ messages in thread

end of thread, other threads:[~2026-01-14 19:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13  7:19 improve zoned XFS GC buffer management v3 Christoph Hellwig
2026-01-13  7:19 ` [PATCH 1/3] block: add a bio_reuse helper Christoph Hellwig
2026-01-13  7:19 ` [PATCH 2/3] xfs: use bio_reuse in the zone GC code Christoph Hellwig
2026-01-13 18:26   ` Keith Busch
2026-01-13 18:32     ` Darrick J. Wong
2026-01-13 18:41       ` Keith Busch
2026-01-14  6:31         ` Christoph Hellwig
2026-01-13  7:19 ` [PATCH 3/3] xfs: rework zone GC buffer management Christoph Hellwig
2026-01-13 13:10 ` improve zoned XFS GC buffer management v3 Carlos Maiolino
  -- strict thread matches above, loose matches on Subject: below --
2026-01-14 13:06 improve zoned XFS GC buffer management v4 Christoph Hellwig
2026-01-14 13:06 ` [PATCH 2/3] xfs: use bio_reuse in the zone GC code Christoph Hellwig
2026-01-14 19:50   ` Darrick J. Wong
2026-01-06  7:58 improve zoned XFS GC buffer management v2 Christoph Hellwig
2026-01-06  7:58 ` [PATCH 2/3] xfs: use bio_reuse in the zone GC code Christoph Hellwig
2026-01-09 12:13   ` Carlos Maiolino
2025-12-18  6:31 improve zoned XFS GC buffer management Christoph Hellwig
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox