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] [day] [month] [year] [list]
Date: Thu, 4 Jan 2024 04:35:46 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Jens Axboe <axboe@...nel.dk>, Gautam Menghani <gautam@...ux.ibm.com>,
	Chaitanya Kulkarni <chaitanyak@...dia.com>, "ming.lei@...hat.com"
	<ming.lei@...hat.com>, "damien.lemoal@...nsource.wdc.com"
	<damien.lemoal@...nsource.wdc.com>, "zhouchengming@...edance.com"
	<zhouchengming@...edance.com>, "nj.shetty@...sung.com"
	<nj.shetty@...sung.com>, "akinobu.mita@...il.com" <akinobu.mita@...il.com>
CC: "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"riteshh@...ux.ibm.com" <riteshh@...ux.ibm.com>
Subject: Re: [PATCH] drivers/block/null_blk: Switch from radix tree api to
 xarrays

On 12/29/23 08:52, Jens Axboe wrote:
> On 12/29/23 9:41 AM, Gautam Menghani wrote:
>> Convert the null_blk driver to use the xarray API instead of radix tree
>> API.
>>
>> Testing:
>> Used blktests test suite (block and zbd suites) to test the current
>> null_blk driver and null_blk driver with this patch applied. The tests
>> results in both the instances were the same.
> What's the purpose of the change?
>
> One thing that always annoys me slightly with xarray is the implied
> locking. So now you're grabbing two locks rather than just utilizing the
> lock that was already held. I think a better transformation would be to
> first change the locking to be closer to the lookup and deletion, and
> then convert to xarray and now being able to drop that other lock. Just
> doing a blind conversion like this without potentially understanding the
> details of it is not a good idea, imho.
>

I agree xarray is a better data structure than radix tree w.r.t. what we did
for brd, but I'm really not sure what it will buy for a testing driver like
null_blk unless it is used in production somewhere where radix trees are not
sufficient, but I've not seen that case ...

-ck


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ