From: hch <hch@lst.de>
To: Guenter Roeck <linux@roeck-us.net>
Cc: hch <hch@lst.de>, Carlos Maiolino <cem@kernel.org>,
Hans Holmberg <Hans.Holmberg@wdc.com>,
Dave Chinner <david@fromorbit.com>,
"Darrick J . Wong" <djwong@kernel.org>,
"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: Tue, 22 Apr 2025 07:48:51 +0200 [thread overview]
Message-ID: <20250422054851.GA29297@lst.de> (raw)
In-Reply-To: <c432be87-827e-4ed7-87e9-3b56d4dbcf26@roeck-us.net>
On Mon, Apr 21, 2025 at 06:41:43AM -0700, Guenter Roeck wrote:
> On 4/21/25 01:31, hch wrote:
>> On Sun, Apr 20, 2025 at 10:42:56AM -0700, Guenter Roeck wrote:
>>> A possible local solution is below. Note the variable type change from s64 to u64.
>>
>> I think that'll need a lower bound of 0 thrown in to be safe as these
>> counters can occasionally underflow.
>>
>> Otherwise this is probably the right thing to do for now until mult_frac
>> gets fixed eventually. Can you add a comment why this open codes
>> mult_frac to the code and send a formal patch for it?
>>
>
> Technically only free needs to be u64 for do_div to work. But that makes
> me wonder what the function is supposed to return if free < 0.
free should be floored to zero, i.e.
free = min(0, xfs_estimate_freecounter(mp, XC_FREE_RTEXTENTS));
next prev parent reply other threads:[~2025-04-22 5:48 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
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 [this message]
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=20250422054851.GA29297@lst.de \
--to=hch@lst.de \
--cc=Hans.Holmberg@wdc.com \
--cc=cem@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=linux@roeck-us.net \
/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.