From: Minwoo Im <minwoo.im.dev@gmail.com>
To: Klaus Jensen <its@irrelevant.dk>
Cc: Keith Busch <kbusch@kernel.org>, Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [RFC PATCH 0/5] hw/block/nvme: support multi-path for ctrl/ns
Date: Sat, 16 Jan 2021 03:38:18 +0900 [thread overview]
Message-ID: <20210115183818.GB2822@localhost.localdomain> (raw)
In-Reply-To: <YAHVKFOYaEO4N6I5@apples.localdomain>
On 21-01-15 18:47:20, Klaus Jensen wrote:
> On Jan 15 09:35, Keith Busch wrote:
> > On Fri, Jan 15, 2021 at 02:57:45PM +0100, Klaus Jensen wrote:
> > >
> > > As you already mentioned, the problem I see with this approach is that
> > > we have separate namespaces attached to separate controllers. So we are
> > > faking it to the max and if I/O starts going through the other
> > > controller we end up on a namespace that is unrelated (different data).
> > > Havoc ensues.
> > >
> > > My approach looks a lot like yours, but I hacked around this by adding
> > > extra 'ctrl-0', 'ctrl-1', ..., link-parameters to the namespace device,
> > > replacing the bus. This works well because the namespace then just
> > > registers with multiple controllers. But adding more parameters like
> > > that just isnt nice, so I've been trying to figure out how to allow a
> > > parameter to be specified multiple times, so we could just do more
> > > 'ctrl'-parameters.
> > >
> > > Alas, since I started thinking about namespace sharing I have been
> > > regretting that I didn't reverse the bus-mechanic for namespace
> > > attachment. It would align better with the theory of operation if it was
> > > the controllers that attached to namespaces, and not the other way
> > > around. So what I would actually really prefer, is that we had multiple
> > > 'ns' link parameters on the controller device.
> >
> > Would this work better if we introduce a new device in the nvme hierarchy:
> > the nvme-subsystem? You could attach multi-path namespaces and
> > controllers to that, and namespaces you don't want shared can attach
> > directly to controllers like they do today. You could also auto-assign
> > cntlid, and you wouldn't need to duplicate serial numbers in your
> > parameters.
>
> I kinda POC'ed that, but I think I tried to make it work with a bus and
> walking it and all kinds of fancy stuff.
>
> I think it can just be a 'link' parameter, so something like:
>
> -device nvme-subsys,id=subsys0
Do we have any plan for default subsys hierarchy? Or is it going to be
a mandatory root node of nvme controllers and namespaces?
> -device nvme,id=nvme0,subsys=subsys0
> -device nvme,id=nvme1,subsys=subsys0
> -device nvme-ns,id=shared-ns1,nsid=1,subsys=subsys0
In this case, what is the default set-up for shared-ns1? Is this
namespace going to be ready right after the two nvme controllers being
realized? If so, do we iterate all the namespace devices in the NVM
subsystem and attach them to this controller in the initial time?
If so, I agree with this approach.
> -device nvme-ns,id=private-ns2,nsid=2,bus=nvme0
This must be the case what Keith mentioned of directly attaching to a
controller. It looks nice. But, one concerning point here is that, in
!shared namespace, if we don't specify 'subsys' property here to attach
it to directly to a controller, it means it implicitly will belong to
the subsys0 where the nvme0 belongs to. It means that user should give
nsid different than 1 which is already shared.
So, how do we make subsys property as a mandatory for namespace device
and provide optional choice for bus. If bus is given to a controller,
then it can mean a private namespace, otherwise it can be shared among
controllers in a subsystem.
prev parent reply other threads:[~2021-01-15 18:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 12:05 [RFC PATCH 0/5] hw/block/nvme: support multi-path for ctrl/ns Minwoo Im
2021-01-15 12:05 ` [RFC PATCH 1/5] hw/block/nvme: add controller id parameter Minwoo Im
2021-01-15 12:05 ` [RFC PATCH 2/5] nvme: add CMIC enum value for Identify Controller Minwoo Im
2021-01-15 12:05 ` [RFC PATCH 3/5] hw/block/nvme: add multi-controller param for mpath Minwoo Im
2021-01-15 12:05 ` [RFC PATCH 4/5] nvme: add NMIC enum value for Identify Namespace Minwoo Im
2021-01-15 12:05 ` [RFC PATCH 5/5] hw/block/nvme: add namespace sharing param for mpath Minwoo Im
2021-01-15 13:57 ` [RFC PATCH 0/5] hw/block/nvme: support multi-path for ctrl/ns Klaus Jensen
2021-01-15 17:35 ` Keith Busch
2021-01-15 17:47 ` Klaus Jensen
2021-01-15 17:53 ` Keith Busch
2021-01-15 18:38 ` Minwoo Im [this message]
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=20210115183818.GB2822@localhost.localdomain \
--to=minwoo.im.dev@gmail.com \
--cc=its@irrelevant.dk \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.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).