Re: [6.2 regression][bisected]discard storm on idle since v6.1-rc8-59-g63a7cb130718 discard=async

Linux regression tracking (Thorsten Leemhuis)
2023-04-11T18:16:16Z

On 11.04.23 19:52, David Sterba wrote:
> On Mon, Apr 10, 2023 at 03:03:37AM +0100, Michael Bromilow wrote:
>> On 04/04/2023 19:51, Boris Burkov wrote:
>>> On Tue, Apr 04, 2023 at 02:15:38PM -0400, Chris Mason wrote:
>>>> So, honestly from my POV the async discard is best suited to consumer
>>>> devices. Our defaults are probably wrong because no matter what you
>>>> choose there's a drive out there that makes it look bad. Also, laptops
>>>> probably don't want the slow dribble.
>>>
>>> Our reasonable options, as I see them:
>>> - back to nodiscard, rely on periodic trims from the OS.
>>> - leave low iops_limit, drives stay busy unexpectedly long, conclude that
>>> that's OK, and communicate the tuning/measurement options better.
>>> - set a high iops_limit (e.g. 1000) drives will get back to idle faster.
>>> - change an unset iops_limit to mean truly unlimited async discard, set
>>> that as the default, and anyone who cares to meter it can set an
>>> iops_limit.
>>>
>>> The regression here is in drive idle time due to modest discard getting
>>> metered out over minutes rather than dealt with relatively quickly. So
>>> I would favor the unlimited async discard mode and will send a patch to
>>> that effect which we can discuss.
>>
>> Will power usage be taken into consideration? I only noticed this regression
>> myself when my laptop started to draw a constant extra ~10W from the constant
>> drive activity, so I imagine other laptop users would also prefer a default
>> which avoids this if possible. If "relatively quickly" means anything more
>> than a few seconds I could see that causing rather significant battery life
>> reductions.
>
> This may need to be configured from userspace, e.g. from
> laptop-mode-tools, I'm not sure if any of the power usage info is
> available from kernel.

Well, from the point of the regression tracker this looks a bit
different: if a system after a kernel updates draw a constant extra
~10W, it's a regression that needs to be fixed. But in the end it's of
course Linus option that matters.

But whatever, Boris afaics is looking for an improved solution that
hopefully avoids the extra power consumption and at the same time does
the right thing on modern enterprise storage devices, so that the
defaults work for the majority of the users. Hopefully this will work
out. :-D

Ciao, Thorsten