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

2017-11-09 Thread Sagi Grimberg
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. O

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

2017-11-09 Thread Christoph Hellwig
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

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

2017-11-09 Thread Sagi Grimberg
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. O

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

2017-11-09 Thread Christoph Hellwig
On Thu, Nov 09, 2017 at 01:37:43PM +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 u

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

2017-11-09 Thread Sagi Grimberg
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?

[PATCH 3/5] nvme: track shared namespaces

2017-11-02 Thread Christoph Hellwig
Introduce a new struct nvme_ns_head that holds information about an actual namespace, unlike struct nvme_ns, which only holds the per-controller namespace information. For private namespaces there is a 1:1 relation of the two, but for shared namespaces this lets us discover all the paths to it. F