lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c575ab39-f118-4459-aaea-6d3c213819cb@roeck-us.net>
Date: Mon, 21 Apr 2025 22:57:31 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: hch <hch@....de>
Cc: Carlos Maiolino <cem@...nel.org>, Hans Holmberg <Hans.Holmberg@....com>,
 Dave Chinner <david@...morbit.com>, "Darrick J . Wong" <djwong@...nel.org>,
 "linux-xfs@...r.kernel.org" <linux-xfs@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] xfs: add tunable threshold parameter for triggering zone
 GC

On 4/21/25 22:48, hch wrote:
> 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));
> 

Do you mean max, maybe ?

Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ