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]
Date:   Wed, 3 Feb 2021 10:36:43 +0800
From:   Lin Feng <linf@...gsu.com>
To:     Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>
Cc:     paolo.valente@...aro.org, linux-kernel@...r.kernel.org,
        linux-block@...r.kernel.org
Subject: Re: [PATCH] Revert "bfq: Fix computation of shallow depth"

Hi all,

On 2/2/21 22:20, Jens Axboe wrote:
> On 2/2/21 5:28 AM, Jan Kara wrote:
>> Hello!
>>
>> On Fri 29-01-21 19:18:08, Lin Feng wrote:
>>> This reverts commit 6d4d273588378c65915acaf7b2ee74e9dd9c130a.
>>>
>>> bfq.limit_depth passes word_depths[] as shallow_depth down to sbitmap core
>>> sbitmap_get_shallow, which uses just the number to limit the scan depth of
>>> each bitmap word, formula:
>>> scan_percentage_for_each_word = shallow_depth / (1 << sbimap->shift) * 100%
>>
>> Looking at sbitmap_get_shallow() again more carefully, I agree that I
>> misunderstood how shallow_depth argument gets used and the original code
>> was correct and I broke it. Thanks for spotting this!
>>
>> What I didn't notice is that shallow_depth indeed gets used for each bitmap
>> word separately and not for bitmap as a whole. I'd say this could use some
>> more documentation but that's unrelated to your revert. So feel free to add:
>>
>> Reviewed-by: Jan Kara <jack@...e.cz>
> 
> I don't have the original patch (neither directly nor in the archive), so
> I had to hand-apply it. In any case, applied for 5.11, thanks.
> 

Take a look at linux-block.git tree, the hand-applied commit for this patch
is broken, the following changing line is left out:
-	bfqd->word_depths[0][1] = max((bt->sb.depth * 3) >> 2, 1U);
+	bfqd->word_depths[0][1] = max(((1U << bt->sb.shift) * 3) >> 2, 1U);

Sorry for making troubles to you, I will resend this patch with tiny commit
log typo fix(sbimap -> sbitmap) and attaching Jan's Reviewed-by, also thanks
his time for reviewing.

Hope this time lkml server will not block my patch.

Thanks,
linfeng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ