The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Hans Holmberg <Hans.Holmberg@wdc.com>
Cc: Carlos Maiolino <cem@kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	"Darrick J . Wong" <djwong@kernel.org>, hch <hch@lst.de>,
	"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xfs: add tunable threshold parameter for triggering zone GC
Date: Sun, 20 Apr 2025 02:47:02 -0700	[thread overview]
Message-ID: <476cf4b6-e3e6-4a64-a400-cc1f05ea44cc@roeck-us.net> (raw)
In-Reply-To: <20250325091007.24070-1-hans.holmberg@wdc.com>

On Tue, Mar 25, 2025 at 09:10:49AM +0000, Hans Holmberg wrote:
> Presently we start garbage collection late - when we start running
> out of free zones to backfill max_open_zones. This is a reasonable
> default as it minimizes write amplification. The longer we wait,
> the more blocks are invalidated and reclaim cost less in terms
> of blocks to relocate.
> 
> Starting this late however introduces a risk of GC being outcompeted
> by user writes. If GC can't keep up, user writes will be forced to
> wait for free zones with high tail latencies as a result.
> 
> This is not a problem under normal circumstances, but if fragmentation
> is bad and user write pressure is high (multiple full-throttle
> writers) we will "bottom out" of free zones.
> 
> To mitigate this, introduce a zonegc_low_space tunable that lets the
> user specify a percentage of how much of the unused space that GC
> should keep available for writing. A high value will reclaim more of
> the space occupied by unused blocks, creating a larger buffer against
> write bursts.
> 
> This comes at a cost as write amplification is increased. To
> illustrate this using a sample workload, setting zonegc_low_space to
> 60% avoids high (500ms) max latencies while increasing write
> amplification by 15%.
> 
...
>  bool
>  xfs_zoned_need_gc(
>  	struct xfs_mount	*mp)
>  {
> +	s64			available, free;
> +
...
> +
> +	free = xfs_estimate_freecounter(mp, XC_FREE_RTEXTENTS);
> +	if (available < mult_frac(free, mp->m_zonegc_low_space, 100))
> +		return true;
> +

With some 32-bit builds (parisc, openrisc so far):

Error log:
ERROR: modpost: "__divdi3" [fs/xfs/xfs.ko] undefined!
ERROR: modpost: "__umoddi3" [fs/xfs/xfs.ko] undefined!
ERROR: modpost: "__moddi3" [fs/xfs/xfs.ko] undefined!
ERROR: modpost: "__udivdi3" [fs/xfs/xfs.ko] undefined!

Guenter

  parent reply	other threads:[~2025-04-20  9:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25  9:10 [PATCH] xfs: add tunable threshold parameter for triggering zone GC Hans Holmberg
2025-03-28 11:01 ` hch
2025-03-28 12:16   ` Hans Holmberg
2025-04-16  8:45 ` Carlos Maiolino
2025-04-20  9:47 ` Guenter Roeck [this message]
2025-04-20 10:53   ` Carlos Maiolino
2025-04-20 17:42     ` Guenter Roeck
2025-04-20 18:07       ` Carlos Maiolino
2025-04-20 19:13         ` Guenter Roeck
2025-04-21  8:08           ` Carlos Maiolino
2025-04-21  8:31       ` hch
2025-04-21 13:41         ` Guenter Roeck
2025-04-22  5:48           ` hch
2025-04-22  5:57             ` Guenter Roeck
2025-04-22  6:01               ` hch
2025-04-22  6:22                 ` Guenter Roeck
2025-04-22  7:56                   ` Carlos Maiolino
2025-04-22  7:59                 ` Carlos Maiolino
2025-04-22  8:05                   ` hch
2025-04-23  6:40       ` Geert Uytterhoeven

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=476cf4b6-e3e6-4a64-a400-cc1f05ea44cc@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Hans.Holmberg@wdc.com \
    --cc=cem@kernel.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@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