From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: linux-xfs@vger.kernel.org, Carlos Maiolino <cem@kernel.org>,
Christoph Hellwig <hch@lst.de>,
Hans Holmberg <hans.holmberg@wdc.com>
Subject: Re: [PATCH v2 4/4] xfs: avoid unnecessary calculations in xfs_zoned_need_gc()
Date: Mon, 16 Mar 2026 16:58:43 +0100 [thread overview]
Message-ID: <20260316155843.GA19837@lst.de> (raw)
In-Reply-To: <20260316114020.753228-5-dlemoal@kernel.org>
On Mon, Mar 16, 2026 at 08:40:20PM +0900, Damien Le Moal wrote:
> If zonegc_low_space is set to zero (which is the default), the second
> condition in xfs_zoned_need_gc() that triggers GC never evaluates to
> true because the calculated threshold will always be 0. So there is no
> need to calculate the threshold and to evaluate that condition. Return
> early when zonegc_low_space is zero.
>
> While at it, add comments to document the intent of each of the 3 tests
> used to determine the return value to control the execution of garbage
> collection.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2026-03-16 15:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 11:40 [PATCH v2 0/4] Zoned XFS code improvements Damien Le Moal
2026-03-16 11:40 ` [PATCH v2 1/4] xfs: avoid unnecessary open zone check in xfs_select_zone_nowait() Damien Le Moal
2026-03-16 15:55 ` Christoph Hellwig
2026-03-17 12:18 ` Hans Holmberg
2026-03-16 11:40 ` [PATCH v2 2/4] xfs: fix a comment typo " Damien Le Moal
2026-03-16 15:56 ` Christoph Hellwig
2026-03-17 12:19 ` Hans Holmberg
2026-03-16 11:40 ` [PATCH v2 3/4] xfs: display more zone related information in mountstats Damien Le Moal
2026-03-16 15:57 ` Christoph Hellwig
2026-03-17 12:21 ` Hans Holmberg
2026-03-16 11:40 ` [PATCH v2 4/4] xfs: avoid unnecessary calculations in xfs_zoned_need_gc() Damien Le Moal
2026-03-16 15:58 ` Christoph Hellwig [this message]
2026-03-17 12:25 ` Hans Holmberg
2026-03-18 10:12 ` [PATCH v2 0/4] Zoned XFS code improvements Carlos Maiolino
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=20260316155843.GA19837@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hans.holmberg@wdc.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.