Thread (20 messages) 20 messages, 4 authors, 2017-11-09

Re: [PATCH 3/5] nvme: track shared namespaces

From: Christoph Hellwig <hch@lst.de>
Date: 2017-11-09 13:20:47
Also in: linux-nvme

On Thu, Nov 09, 2017 at 02:59:50PM +0200, Sagi Grimberg wrote:
quoted
quoted
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help