public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Chris Mason <clm@meta.com>, Christoph Hellwig <hch@lst.de>,
	Jens Axboe <axboe@kernel.dk>, Carlos Maiolino <cem@kernel.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Hans Holmberg <hans.holmberg@wdc.com>,
	linux-block@vger.kernel.org, linux-xfs@vger.kernel.org,
	Carlos Maiolino <cmaiolino@redhat.com>
Subject: Re: [PATCH 3/3] xfs: rework zone GC buffer management
Date: Tue, 27 Jan 2026 07:53:18 +0100	[thread overview]
Message-ID: <20260127065318.GA26234@lst.de> (raw)
In-Reply-To: <aXfO_ghd0yoKK8dm@kbusch-mbp>

On Mon, Jan 26, 2026 at 01:30:54PM -0700, Keith Busch wrote:
> I think you're right that ring wrap can't distinguish full vs. empty here.
>  
> > A common solution is to track a separate count, or to sacrifice one slot
> > so head == tail always means empty, and head == tail-1 means full.
> 
> The buffer size is a power of two, so I suggest just let scratch_head
> and scratch_tail only increment without modulo, and rely on the unsigned
> int wrapping. We can get the actual offset by masking the head with the
> scratch size.

I actually added a available tracking member yesterday.  It turns out
this simplified the code quite a bit, but so does your version.  I've
kicked off QA on it, which I'd have to redo for this version.

https://git.infradead.org/?p=users/hch/xfs.git;a=shortlog;h=refs/heads/xfs-zoned-fixes


  reply	other threads:[~2026-01-27  6:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 13:06 improve zoned XFS GC buffer management v4 Christoph Hellwig
2026-01-14 13:06 ` [PATCH 1/3] block: add a bio_reuse helper 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-14 13:06 ` [PATCH 3/3] xfs: rework zone GC buffer management Christoph Hellwig
2026-01-14 19:59   ` Darrick J. Wong
2026-01-15  6:12     ` Christoph Hellwig
2026-01-25  0:03   ` Chris Mason
2026-01-26 20:30     ` Keith Busch
2026-01-27  6:53       ` Christoph Hellwig [this message]
2026-01-21 12:21 ` improve zoned XFS GC buffer management v4 Carlos Maiolino
  -- strict thread matches above, loose matches on Subject: below --
2026-01-13  7:19 improve zoned XFS GC buffer management v3 Christoph Hellwig
2026-01-13  7:19 ` [PATCH 3/3] xfs: rework zone GC buffer management Christoph Hellwig
2026-01-06  7:58 improve zoned XFS GC buffer management v2 Christoph Hellwig
2026-01-06  7:58 ` [PATCH 3/3] xfs: rework zone GC buffer management Christoph Hellwig
2026-01-09 12:24   ` Carlos Maiolino
2025-12-18  6:31 improve zoned XFS " Christoph Hellwig
2025-12-18  6:31 ` [PATCH 3/3] xfs: rework zone " Christoph Hellwig
2025-12-18  7:12   ` Damien Le Moal
2025-12-19  8:06   ` Hans Holmberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260127065318.GA26234@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=cem@kernel.org \
    --cc=clm@meta.com \
    --cc=cmaiolino@redhat.com \
    --cc=dlemoal@kernel.org \
    --cc=hans.holmberg@wdc.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox