All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Christoph Hellwig <hch@lst.de>
Cc: 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 18:09:48 +0200	[thread overview]
Message-ID: <1e0afeee-81d4-ca8e-4caa-2321640873e2@grimberg.me> (raw)
In-Reply-To: <20171109132046.GA22728@lst.de>


>>>>> 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.

Yea,

I'm good,

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

WARNING: multiple messages have this Message-ID (diff)
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH 3/5] nvme: track shared namespaces
Date: Thu, 9 Nov 2017 18:09:48 +0200	[thread overview]
Message-ID: <1e0afeee-81d4-ca8e-4caa-2321640873e2@grimberg.me> (raw)
In-Reply-To: <20171109132046.GA22728@lst.de>


>>>>> 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.

Yea,

I'm good,

Reviewed-by: Sagi Grimberg <sagi at grimberg.me>

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

Thread overview: 40+ 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 ` Christoph Hellwig
2017-11-02 18:30 ` [PATCH 1/5] nvme: track subsystems Christoph Hellwig
2017-11-02 18:30   ` Christoph Hellwig
2017-11-09 11:33   ` Sagi Grimberg
2017-11-09 11:33     ` Sagi Grimberg
2017-11-09 12:53     ` Christoph Hellwig
2017-11-09 12:53       ` Christoph Hellwig
2017-11-09 13:01       ` Sagi Grimberg
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   ` Christoph Hellwig
2017-11-02 18:30 ` [PATCH 3/5] nvme: track shared namespaces Christoph Hellwig
2017-11-02 18:30   ` Christoph Hellwig
2017-11-09 11:37   ` Sagi Grimberg
2017-11-09 11:37     ` Sagi Grimberg
2017-11-09 12:52     ` Christoph Hellwig
2017-11-09 12:52       ` Christoph Hellwig
2017-11-09 12:59       ` Sagi Grimberg
2017-11-09 12:59         ` Sagi Grimberg
2017-11-09 13:20         ` Christoph Hellwig
2017-11-09 13:20           ` Christoph Hellwig
2017-11-09 16:09           ` Sagi Grimberg [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-02 18:30   ` Christoph Hellwig
2017-11-06 17:03   ` Mike Snitzer
2017-11-06 17:03     ` Mike Snitzer
2017-11-08  8:54   ` Christoph Hellwig
2017-11-08  8:54     ` Christoph Hellwig
2017-11-08 11:18     ` Hannes Reinecke
2017-11-08 11:18       ` Hannes Reinecke
2017-11-09  9:13       ` Christoph Hellwig
2017-11-09  9:13         ` Christoph Hellwig
2017-11-09 15:44   ` Hannes Reinecke
2017-11-09 15:44     ` Hannes Reinecke
2017-11-09 15:51     ` Christoph Hellwig
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
2017-11-02 18:30   ` 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=1e0afeee-81d4-ca8e-4caa-2321640873e2@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jthumshirn@suse.de \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.