linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-nvme@lists.infradead.org, hch@lst.de,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
	sagi@grimberg.me
Subject: Re: [PATCH V3 02/10] nvme-core: use xarray for ctrl ns tracking
Date: Tue, 14 Jul 2020 18:41:51 -0700	[thread overview]
Message-ID: <20200715014151.GD2772284@dhcp-10-100-145-180.wdl.wdc.com> (raw)
In-Reply-To: <20200715013342.GD12769@casper.infradead.org>

On Wed, Jul 15, 2020 at 02:33:42AM +0100, Matthew Wilcox wrote:
> On Tue, Jul 14, 2020 at 05:55:09PM -0700, Keith Busch wrote:
> > On Tue, Jul 14, 2020 at 04:30:49PM -0700, Chaitanya Kulkarni wrote:
> > > @@ -3933,9 +3918,7 @@ static void nvme_ns_remove(struct nvme_ns *ns)
> > >  			blk_integrity_unregister(ns->disk);
> > >  	}
> > >  
> > > -	down_write(&ns->ctrl->namespaces_rwsem);
> > > -	list_del_init(&ns->list);
> > > -	up_write(&ns->ctrl->namespaces_rwsem);
> > > +	xa_erase(xa, ns->head->ns_id);
> > 
> > Since you're using rcu to protect the kref_get() on load, we need a
> > synchronize_rcu() after removing it from the xarray.
> 
> No, synchronize_rcu() is expensive.  We should instead use call_rcu()
> to free the ns once the refcount hits zero.

Yeah, that is an even better option, though namespace removal is so
infrequent that cost isn't really a concern: this function already calls
synchronize_rcu() and syncronize_srcu().

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-07-15  1:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 23:30 [PATCH V3 00/10] nvme: use xarray for ns tracking Chaitanya Kulkarni
2020-07-14 23:30 ` [PATCH V3 01/10] xarray: add __xa_load() version Chaitanya Kulkarni
2020-07-15  0:46   ` Keith Busch
2020-07-15  0:47     ` Chaitanya Kulkarni
2020-07-14 23:30 ` [PATCH V3 02/10] nvme-core: use xarray for ctrl ns tracking Chaitanya Kulkarni
2020-07-15  0:55   ` Keith Busch
2020-07-15  1:33     ` Matthew Wilcox
2020-07-15  1:41       ` Keith Busch [this message]
2020-07-15  5:12         ` Chaitanya Kulkarni
2020-07-14 23:30 ` [PATCH V3 03/10] nvme: centralize queue action nvme_kill_queues() Chaitanya Kulkarni
2020-07-15  1:36   ` Keith Busch
2020-07-15  1:39     ` Matthew Wilcox
2020-07-15  7:11   ` Christoph Hellwig
2020-07-14 23:30 ` [PATCH V3 04/10] nvme: centralize queue action nvme_unfreeze() Chaitanya Kulkarni
2020-07-14 23:30 ` [PATCH V3 05/10] nvme: centralize queue action nvme_wait_freeze() Chaitanya Kulkarni
2020-07-14 23:30 ` [PATCH V3 06/10] nvme: centralize queue action nvme_start_freeze() Chaitanya Kulkarni
2020-07-14 23:30 ` [PATCH V3 07/10] nvme: centralize queue action nvme_stop_queues() Chaitanya Kulkarni
2020-07-14 23:30 ` [PATCH V3 08/10] nvme: centralize queue action nvme_start_queues() Chaitanya Kulkarni
2020-07-14 23:30 ` [PATCH V3 09/10] nvme: centralize queue action nvme_sync_queues() Chaitanya Kulkarni
2020-07-14 23:30 ` [PATCH V3 10/10] nvmet: use xarray for ctrl ns storing Chaitanya Kulkarni
2020-07-15  7:10   ` Christoph Hellwig
2020-07-17  1:52     ` Chaitanya Kulkarni
2020-07-15  7:03 ` [PATCH V3 00/10] nvme: use xarray for ns tracking Christoph Hellwig
2020-07-16  1:48   ` Chaitanya Kulkarni
2020-07-17  2:02   ` Chaitanya Kulkarni

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=20200715014151.GD2772284@dhcp-10-100-145-180.wdl.wdc.com \
    --to=kbusch@kernel.org \
    --cc=chaitanya.kulkarni@wdc.com \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).