From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Jens Axboe <axboe@kernel.dk>,
Gautam Menghani <gautam@linux.ibm.com>,
Chaitanya Kulkarni <chaitanyak@nvidia.com>,
"ming.lei@redhat.com" <ming.lei@redhat.com>,
"damien.lemoal@opensource.wdc.com"
<damien.lemoal@opensource.wdc.com>,
"zhouchengming@bytedance.com" <zhouchengming@bytedance.com>,
"nj.shetty@samsung.com" <nj.shetty@samsung.com>,
"akinobu.mita@gmail.com" <akinobu.mita@gmail.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"riteshh@linux.ibm.com" <riteshh@linux.ibm.com>
Subject: Re: [PATCH] drivers/block/null_blk: Switch from radix tree api to xarrays
Date: Thu, 4 Jan 2024 04:35:46 +0000 [thread overview]
Message-ID: <05b18725-dbf4-42eb-a233-d65611eb76bf@nvidia.com> (raw)
In-Reply-To: <f1f002e9-8010-4b74-9da8-2551be97fa6f@kernel.dk>
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
prev parent reply other threads:[~2024-01-04 4:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 16:41 Gautam Menghani
2023-12-29 16:52 ` Jens Axboe
2024-01-04 4:35 ` Chaitanya Kulkarni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=05b18725-dbf4-42eb-a233-d65611eb76bf@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=akinobu.mita@gmail.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@opensource.wdc.com \
--cc=gautam@linux.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=nj.shetty@samsung.com \
--cc=riteshh@linux.ibm.com \
--cc=zhouchengming@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®