From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Carlos Maiolino <cem@kernel.org>,
Hans Holmberg <hans.holmberg@wdc.com>,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH 6/7] xfs: improve the comments in xfs_max_open_zones
Date: Wed, 16 Jul 2025 09:03:00 -0700 [thread overview]
Message-ID: <20250716160300.GM2672049@frogsfrogsfrogs> (raw)
In-Reply-To: <20250716125413.2148420-7-hch@lst.de>
On Wed, Jul 16, 2025 at 02:54:06PM +0200, Christoph Hellwig wrote:
> Describe the rationale for the decisions a bit better.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks good,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_zone_alloc.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/fs/xfs/xfs_zone_alloc.c b/fs/xfs/xfs_zone_alloc.c
> index d9e2b1411434..c1f053f4a82a 100644
> --- a/fs/xfs/xfs_zone_alloc.c
> +++ b/fs/xfs/xfs_zone_alloc.c
> @@ -1114,24 +1114,27 @@ xfs_get_zone_info_cb(
> }
>
> /*
> - * Calculate the max open zone limit based on the of number of
> - * backing zones available
> + * Calculate the max open zone limit based on the of number of backing zones
> + * available.
> */
> static inline uint32_t
> xfs_max_open_zones(
> struct xfs_mount *mp)
> {
> unsigned int max_open, max_open_data_zones;
> +
> /*
> - * We need two zones for every open data zone,
> - * one in reserve as we don't reclaim open zones. One data zone
> - * and its spare is included in XFS_MIN_ZONES.
> + * We need two zones for every open data zone, one in reserve as we
> + * don't reclaim open zones. One data zone and its spare is included
> + * in XFS_MIN_ZONES to support at least one user data writer.
> */
> max_open_data_zones = (mp->m_sb.sb_rgcount - XFS_MIN_ZONES) / 2 + 1;
> max_open = max_open_data_zones + XFS_OPEN_GC_ZONES;
>
> /*
> - * Cap the max open limit to 1/4 of available space
> + * Cap the max open limit to 1/4 of available space. Without this we'd
> + * run out of easy reclaim targets too quickly and storage devices don't
> + * handle huge numbers of concurrent write streams overly well.
> */
> return clamp(max_open, XFS_MIN_OPEN_ZONES, mp->m_sb.sb_rgcount / 4);
> }
> --
> 2.47.2
>
>
next prev parent reply other threads:[~2025-07-16 16:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 12:54 misc zoned allocators fixes and cleanups Christoph Hellwig
2025-07-16 12:54 ` [PATCH 1/7] xfs: don't allocate the xfs_extent_busy structure for zoned RTGs Christoph Hellwig
2025-07-16 15:50 ` Darrick J. Wong
2025-07-17 8:11 ` Carlos Maiolino
2025-07-16 12:54 ` [PATCH 2/7] xfs: use a uint32_t to cache i_used_blocks in xfs_init_zone Christoph Hellwig
2025-07-16 15:51 ` Darrick J. Wong
2025-07-16 12:54 ` [PATCH 3/7] xfs: rename oz_write_pointer to oz_allocated Christoph Hellwig
2025-07-16 15:58 ` Darrick J. Wong
2025-07-16 12:54 ` [PATCH 4/7] xfs: stop passing an inode to the zone space reservation helpers Christoph Hellwig
2025-07-16 15:59 ` Darrick J. Wong
2025-07-16 12:54 ` [PATCH 5/7] xfs: replace min & max with clamp() in xfs_max_open_zones() Christoph Hellwig
2025-07-16 16:02 ` Darrick J. Wong
2025-07-16 16:52 ` Alan Huang
2025-07-17 5:16 ` Christoph Hellwig
2025-07-17 6:42 ` Alan Huang
2025-07-16 12:54 ` [PATCH 6/7] xfs: improve the comments in xfs_max_open_zones Christoph Hellwig
2025-07-16 16:03 ` Darrick J. Wong [this message]
2025-07-16 12:54 ` [PATCH 7/7] xfs: improve the comments in xfs_select_zone_nowait Christoph Hellwig
2025-07-16 16:03 ` Darrick J. Wong
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=20250716160300.GM2672049@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hans.holmberg@wdc.com \
--cc=hch@lst.de \
--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