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: <916dba91-07b9-23ef-4d40-21120c7287b3@huaweicloud.com>
Date: Tue, 10 Dec 2024 10:54:47 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Bart Van Assche <bvanassche@....org>, Yu Kuai <yukuai1@...weicloud.com>,
 axboe@...nel.dk, akpm@...ux-foundation.org, yang.yang@...o.com,
 ming.lei@...hat.com, osandov@...com, paolo.valente@...aro.org
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
 yi.zhang@...wei.com, yangerkun@...wei.com, "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH RFC 2/3] lib/sbitmap: don't export sbitmap_get_shallow()

Hi,

在 2024/12/10 2:05, Bart Van Assche 写道:
> On 12/9/24 7:55 PM, Yu Kuai wrote:
>> -/**
>> - * sbitmap_get_shallow() - Try to allocate a free bit from a &struct 
>> sbitmap,
>> - * limiting the depth used from each word.
>> - * @sb: Bitmap to allocate from.
>> - * @shallow_depth: The maximum number of bits to allocate from a 
>> single word.
>> - *
>> - * This rather specific operation allows for having multiple users with
>> - * different allocation limits. E.g., there can be a high-priority 
>> class that
>> - * uses sbitmap_get() and a low-priority class that uses 
>> sbitmap_get_shallow()
>> - * with a @shallow_depth of (1 << (@sb->shift - 1)). Then, the 
>> low-priority
>> - * class can only allocate half of the total bits in the bitmap, 
>> preventing it
>> - * from starving out the high-priority class.
>> - *
>> - * Return: Non-negative allocated bit number if successful, -1 
>> otherwise.
>> - */
>> -int sbitmap_get_shallow(struct sbitmap *sb, unsigned long 
>> shallow_depth);
> 
> Please retain the above comment block by moving it into lib/sbitmap.c.
> 

Since the comment must be updated after patch 3, I'll apply the last
patch and update comment first, and do this cleanup at last.

Thanks,
Kuai

> Thanks,
> 
> Bart.
> .
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ