From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Yongji Xie <elohimes@gmail.com>,
nixun@baidu.com, zhangyu31@baidu.com, lilin24@baidu.com,
qemu-devel@nongnu.org, chaiwen@baidu.com,
marcandre.lureau@redhat.com, Xie Yongji <xieyongji@baidu.com>,
maxime.coquelin@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-4.0 0/6] vhost-user-blk: Add support for backend reconnecting
Date: Fri, 14 Dec 2018 08:31:58 -0500 [thread overview]
Message-ID: <20181214082455-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <fdccd7a0-80b8-0449-3da2-807f588fda5e@redhat.com>
On Fri, Dec 14, 2018 at 12:36:01PM +0800, Jason Wang wrote:
>
> On 2018/12/13 下午10:56, Michael S. Tsirkin wrote:
> > On Thu, Dec 13, 2018 at 11:41:06AM +0800, Yongji Xie wrote:
> > > On Thu, 13 Dec 2018 at 10:58, Jason Wang <jasowang@redhat.com> wrote:
> > > >
> > > > On 2018/12/12 下午5:18, Yongji Xie wrote:
> > > > > > > > Ok, then we can simply forbid increasing the avail_idx in this case?
> > > > > > > >
> > > > > > > > Basically, it's a question of whether or not it's better to done it in
> > > > > > > > the level of virtio instead of vhost. I'm pretty sure if we expose
> > > > > > > > sufficient information, it could be done without touching vhost-user.
> > > > > > > > And we won't deal with e.g migration and other cases.
> > > > > > > >
> > > > > > > OK, I get your point. That's indeed an alternative way. But this feature seems
> > > > > > > to be only useful to vhost-user backend.
> > > > > > I admit I could not think of a use case other than vhost-user.
> > > > > >
> > > > > >
> > > > > > > I'm not sure whether it make sense to
> > > > > > > touch virtio protocol for this feature.
> > > > > > Some possible advantages:
> > > > > >
> > > > > > - Feature could be determined and noticed by user or management layer.
> > > > > >
> > > > > > - There's no need to invent ring layout specific protocol to record in
> > > > > > flight descriptors. E.g if my understanding is correct, for this series
> > > > > > and for the example above, it still can not work for packed virtqueue
> > > > > > since descriptor id is not sufficient (descriptor could be overwritten
> > > > > > by used one). You probably need to have a (partial) copy of descriptor
> > > > > > ring for this.
> > > > > >
> > > > > > - No need to deal with migration, all information was in guest memory.
> > > > > >
> > > > > Yes, we have those advantages. But seems like handle this in vhost-user
> > > > > level could be easier to be maintained in production environment. We can
> > > > > support old guest. And the bug fix will not depend on guest kernel updating.
> > > >
> > > > Yes. But the my main concern is the layout specific data structure. If
> > > > it could be done through a generic structure (can it?), it would be
> > > > fine. Otherwise, I believe we don't want another negotiation about what
> > > > kind of layout that backend support for reconnect.
> > > >
> > > Yes, the current layout in shared memory didn't support packed virtqueue because
> > > the information of one descriptor in descriptor ring will not be
> > > available once device fetch it.
> > >
> > > I also thought about a generic structure before. But I failed... So I
> > > tried another way
> > > to acheive that in this series. In QEMU side, we just provide a shared
> > > memory to backend
> > > and we didn't define anything for this memory. In backend side, they
> > > should know how to
> > > use those memory to record inflight I/O no matter what kind of
> > > virtqueue they used.
> > > Thus, If we updates virtqueue for new virtio spec in the feature, we
> > > don't need to touch
> > > QEMU and guest. What do you think about it?
> > >
> > > Thanks,
> > > Yongji
> > I think that's a good direction to take, yes.
> > Backends need to be very careful about the layout,
> > with versioning etc.
>
>
> I'm not sure this could be done 100% transparent to qemu. E.g you need to
> deal with reset I think and you need to carefully choose the size of the
> region. Which means you need negotiate the size, layout through backend.
I am not sure I follow. The point is all this state is internal to the
backend. QEMU does not care at all - it just helps a little by hanging
on to it.
> And
> need to deal with migration with them.
Good catch.
There definitely is an issue in that you can not migrate with backend
being disconnected: migration needs to flush the backend and we can't
when it's disconnected. This needs to be addressed.
I think it's cleanest to just defer migration
until backend does reconnect.
Backend cross version migration is all messed up in vhost user, I agree.
There was a plan to fix it that was never executed unfortunately.
Maxime, do you still plan to look into it?
> This is another sin of splitting
> virtio dataplane from qemu anyway.
>
>
> Thanks
It wasn't split as such - dpdk was never a part of qemu. We just
enabled it without fuse hacks.
--
MST
next prev parent reply other threads:[~2018-12-14 13:32 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 6:35 [Qemu-devel] [PATCH for-4.0 0/6] vhost-user-blk: Add support for backend reconnecting elohimes
2018-12-06 6:35 ` [Qemu-devel] [PATCH for-4.0 1/6] char-socket: Enable "wait" option for client mode elohimes
2018-12-06 7:23 ` Marc-André Lureau
2018-12-06 7:53 ` Yongji Xie
2018-12-06 9:31 ` Yury Kotov
2018-12-06 6:35 ` [Qemu-devel] [PATCH for-4.0 2/6] vhost-user: Add shared memory to record inflight I/O elohimes
2018-12-06 7:19 ` Marc-André Lureau
2018-12-06 7:22 ` Yongji Xie
2018-12-06 6:35 ` [Qemu-devel] [PATCH for-4.0 3/6] libvhost-user: Introduce vu_queue_map_desc() elohimes
2018-12-06 7:16 ` Marc-André Lureau
2018-12-06 6:35 ` [Qemu-devel] [PATCH for-4.0 4/6] libvhost-user: Support recording inflight I/O in shared memory elohimes
2018-12-06 6:35 ` [Qemu-devel] [PATCH for-4.0 5/6] vhost-user-blk: Add support for reconnecting backend elohimes
2018-12-06 12:21 ` Yury Kotov
2018-12-06 13:26 ` Yongji Xie
2018-12-06 6:35 ` [Qemu-devel] [PATCH for-4.0 6/6] contrib/vhost-user-blk: enable inflight I/O recording elohimes
2018-12-06 7:23 ` [Qemu-devel] [PATCH for-4.0 0/6] vhost-user-blk: Add support for backend reconnecting Marc-André Lureau
2018-12-06 7:43 ` Yongji Xie
2018-12-06 9:21 ` Yury Kotov
2018-12-06 9:41 ` Yongji Xie
2018-12-06 9:52 ` Yury Kotov
2018-12-06 10:35 ` Yongji Xie
2018-12-06 13:57 ` Jason Wang
2018-12-06 13:59 ` Michael S. Tsirkin
2018-12-10 9:32 ` Jason Wang
2018-12-12 2:48 ` Yongji Xie
2018-12-12 3:00 ` Jason Wang
2018-12-12 3:21 ` Yongji Xie
2018-12-12 4:06 ` Jason Wang
2018-12-12 6:41 ` Yongji Xie
2018-12-12 7:47 ` Jason Wang
2018-12-12 9:18 ` Yongji Xie
2018-12-13 2:58 ` Jason Wang
2018-12-13 3:41 ` Yongji Xie
2018-12-13 14:56 ` Michael S. Tsirkin
2018-12-14 4:36 ` Jason Wang
2018-12-14 13:31 ` Michael S. Tsirkin [this message]
2018-12-06 14:00 ` Jason Wang
2018-12-07 8:56 ` Yongji Xie
2018-12-13 14:45 ` Michael S. Tsirkin
2018-12-14 1:56 ` Yongji Xie
2018-12-14 2:20 ` Michael S. Tsirkin
2018-12-14 2:33 ` Yongji Xie
2018-12-14 21:23 ` Michael S. Tsirkin
2018-12-15 11:34 ` Yongji Xie
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=20181214082455-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=chaiwen@baidu.com \
--cc=elohimes@gmail.com \
--cc=jasowang@redhat.com \
--cc=lilin24@baidu.com \
--cc=marcandre.lureau@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=nixun@baidu.com \
--cc=qemu-devel@nongnu.org \
--cc=xieyongji@baidu.com \
--cc=zhangyu31@baidu.com \
/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).