linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Christoph Hellwig <hch@lst.de>,
	Keith Busch <keith.busch@intel.com>, Jens Axboe <axboe@kernel.dk>,
	Hannes Reinecke <hare@suse.de>,
	Johannes Thumshirn <jthumshirn@suse.de>,
	linux-nvme@lists.infradead.org, linux-block@vger.kernel.org
Subject: Re: [PATCH 3/5] nvme: track shared namespaces
Date: Thu, 9 Nov 2017 14:20:46 +0100	[thread overview]
Message-ID: <20171109132046.GA22728@lst.de> (raw)
In-Reply-To: <1a4292d3-b9c6-976c-69aa-a42f84469cb2@grimberg.me>

On Thu, Nov 09, 2017 at 02:59:50PM +0200, Sagi Grimberg wrote:
>
>>>> To allow lockless path lookup the list of nvme_ns structures per
>>>> nvme_ns_head is protected by SRCU, which requires freeing the nvme_ns
>>>> structure through call_srcu.
>>>
>>> Can you remind me why isn't rcu sufficient? Can looking up a
>>> path (ns from head->list) block?
>>
>> blk_mq_make_request can block.
>
> Oh I see, so can you explain why srcu should cover direct_make_request?
>
> What if we were to do:
> --
> 	rcu_read_lock();
> 	ns = nvme_find_path(head);
> 	rcu_read_unlock();
> 	if (likely(ns)) {
> 		...
> --

That way we'd have to take and release a namespace reference for every I/O.

  reply	other threads:[~2017-11-09 13:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 18:30 nvme multipath support V6 Christoph Hellwig
2017-11-02 18:30 ` [PATCH 1/5] nvme: track subsystems Christoph Hellwig
2017-11-09 11:33   ` Sagi Grimberg
2017-11-09 12:53     ` Christoph Hellwig
2017-11-09 13:01       ` Sagi Grimberg
2017-11-02 18:30 ` [PATCH 2/5] nvme: introduce a nvme_ns_ids structure Christoph Hellwig
2017-11-02 18:30 ` [PATCH 3/5] nvme: track shared namespaces Christoph Hellwig
2017-11-09 11:37   ` Sagi Grimberg
2017-11-09 12:52     ` Christoph Hellwig
2017-11-09 12:59       ` Sagi Grimberg
2017-11-09 13:20         ` Christoph Hellwig [this message]
2017-11-09 16:09           ` Sagi Grimberg
2017-11-02 18:30 ` [PATCH 4/5] nvme: implement multipath access to nvme subsystems Christoph Hellwig
2017-11-06 17:03   ` Mike Snitzer
2017-11-08  8:54   ` Christoph Hellwig
2017-11-08 11:18     ` Hannes Reinecke
2017-11-09  9:13       ` Christoph Hellwig
2017-11-09 15:44   ` Hannes Reinecke
2017-11-09 15:51     ` Christoph Hellwig
2017-11-02 18:30 ` [PATCH 5/5] nvme: also expose the namespace identification sysfs files for mpath nodes 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=20171109132046.GA22728@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.de \
    --cc=jthumshirn@suse.de \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.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;
as well as URLs for NNTP newsgroup(s).