From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: kbusch@kernel.org, hch@lst.de, linux-nvme@lists.infradead.org,
sagi@grimberg.me
Subject: Re: [PATCH] nvme-core: use xarray for cel storing
Date: Wed, 23 Sep 2020 07:07:25 +0200 [thread overview]
Message-ID: <20200923050725.GB14878@lst.de> (raw)
In-Reply-To: <20200922210529.4530-1-chaitanya.kulkarni@wdc.com>
On Tue, Sep 22, 2020 at 02:05:29PM -0700, Chaitanya Kulkarni wrote:
> When using linked list we have to open code the locking, search, and
> destroy operations with the loops even if data structure doesn't fall
> into the fast path.
>
> One of the main advantage of having XArray to store, search, and remove
> items is that it handles all the locking by itself, avoids the loops
> when using linked lists, provides clear API to replace the linked list's
> search and destroy loops.
>
> This patch replaces the ctrl->cel list with XArray and removes :-
>
> a. Extra code needed for the linked list for ctrl->cel item management
> such as nvme_find_cel().
> b. Destroy loop in the nvme_free_ctrl().
> c. Explicit insertion locking in the nvme_get_effects_log().
A nice, I thought of that I while ago but never got to it. This looks
exactly like what I had in mind.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-09-23 5:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 21:05 [PATCH] nvme-core: use xarray for cel storing Chaitanya Kulkarni
2020-09-23 5:07 ` Christoph Hellwig [this message]
2020-09-23 15:18 ` Keith Busch
2020-09-24 5:07 ` Christoph Hellwig
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=20200923050725.GB14878@lst.de \
--to=hch@lst.de \
--cc=chaitanya.kulkarni@wdc.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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