From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Eugenio Perez Martin <eperezma@redhat.com>,
virtio-comment@lists.oasis-open.org,
Virtio-Dev <virtio-dev@lists.oasis-open.org>,
Max Gurtovoy <mgurtovoy@nvidia.com>,
Cornelia Huck <cohuck@redhat.com>, Oren Duer <oren@nvidia.com>,
Shahaf Shuler <shahafs@nvidia.com>,
Parav Pandit <parav@nvidia.com>, Bodong Wang <bodong@nvidia.com>,
Alexander Mikheev <amikheev@nvidia.com>,
Halil Pasic <pasic@linux.ibm.com>,
mreitz@redhat.com
Subject: Re: [virtio-comment] [PATCH V2 2/2] virtio: introduce STOP status bit
Date: Thu, 5 Aug 2021 09:19:28 +0100 [thread overview]
Message-ID: <YQufELMuQ83V3C+i@work-vm> (raw)
In-Reply-To: <010a3ceb-70a9-d5c4-7de3-8d8f692efbb1@redhat.com>
* Jason Wang (jasowang@redhat.com) wrote:
>
> 在 2021/8/4 下午5:07, Dr. David Alan Gilbert 写道:
> > * Jason Wang (jasowang@redhat.com) wrote:
> > > 在 2021/8/3 下午8:22, Dr. David Alan Gilbert 写道:
> > > > * Jason Wang (jasowang@redhat.com) wrote:
> > > > > 在 2021/8/3 下午6:37, Stefan Hajnoczi 写道:
> > > > > > On Tue, Aug 03, 2021 at 02:33:20PM +0800, Jason Wang wrote:
> > > > > > > 在 2021/7/26 下午11:07, Stefan Hajnoczi 写道:
> > > > > > > > I guess this is just a summary of what we've already discussed and not
> > > > > > > > new information. I think an implementation today would use DBus VMState
> > > > > > > > to transfer implementation-specific device state (an opaque blob).
> > > > > > > Instead of trying to migrate those opaque stuffs which is kind of tricky, I
> > > > > > > wonder if we can avoid them by recording the mapping in the shared
> > > > > > > filesystem itself.
> > > > > > The problem is that virtiofsd has no way of reopening the exact same
> > > > > > files without Linux file handles.
> > > > > I believe if we want to support live migration of the passthrough
> > > > > filesystem. The filesystem itself must be shared? (like NFS)
> > > > >
> > > > > Assuming this is true. Can we store those mapping (e.g fuse inode -> host
> > > > > inode) in a known path/file in the passthrough filesystem itself and hide
> > > > > that file from the guest?
> > > > That's pretty dangerous; it assumes that the filesystem is only used
> > > > together with virtiofs; as a *shared* filesystem it's possible that it's
> > > > being used directly by normal NFS clients as well.
> > > > It's also very racy; trying to make sure those mappings reflect the
> > > > *current* meaning of inodes even while they're changing under your feet
> > > > is non-trivial.
> > >
> > > Right, it's just a thought to avoid migrating implementation specific
> > > stuffs.
> > >
> > >
> > > > > The destination can simply open this unkown file and do the lookup the
> > > > > mapping and reopen the file if necessary.
> > > > >
> > > > > Then we don't need the Linux file handle.
> > > > >
> > > > >
> > > > > > So they need to be transferred to the
> > > > > > destination (or stored on a shared file system as you suggested),
> > > > > > regardless of whether they are part of the VIRTIO spec's device state or
> > > > > > not.
> > > > > >
> > > > > > Implementation-specific state can be considered outside the scope of the
> > > > > > VIRTIO spec. In other words, we could exclude it from the VIRTIO-level
> > > > > > device state that save/load operate on. This does not solve the problem,
> > > > > > it just shifts the responsibility to the virtualization stack to migrate
> > > > > > this state.
> > > > > >
> > > > > > The Linux file handles or other virtiofsd implementation-specific state
> > > > > > would be migrated separately (e.g. using DBus VMstate) so that by the
> > > > > > time the destination device does a VIRTIO load operation, it has the
> > > > > > necessary implementation-specific state ready.
> > > > > That may work but I want to get rid of the implementation specific stuffs
> > > > > like linux handles completely.
> > > > I'm not sure how much implementation specific you can get rid of; but
> > > > you should be able to comparmentalise it, and you should be able to make
> > > > it so that common things can be shared;
> > >
> > > Yes, that's is the way we need to go.
> > >
> > >
> > > > i.e. if I have two
> > > > implementations of virtiofs, both running on Linux, then it might be
> > > > good if we can live migrate between them, and standardise the format.
> > >
> > > As replied in the previous version, I'm not sure how hard it is consider the
> > > file_handle mentioned by Stefan is not a part of uABI and it depends on
> > > specific kernel config to work.
> > >
> > >
> > > > So, I'd expect the core virtiofs data to be standardised globally,
> > >
> > > Yes, maybe start at the FUSE level.
> > >
> > >
> > > > then
> > > > I'd expect how Linux implementations work to be standardised.
> > >
> > > Does it mean we need:
> > >
> > > 1) port virtiofsd to multiple platforms
> > > 2) only support live migration among virtiofds
> > >
> > > ?
> > Not necessarily; I mean that we have layers:
> > a) Virtio
> > b) Virtio-fs
> > c]
> > c1) virtio-fs backed by a Linux filesystem
> > c2) virtio-fs backed by some object store
> > c3) virito-fs backed by something else
> >
> > (a) is standardised
> > The migration data for (b) can be standardised
>
>
> That would be good.
>
>
> > We can also standardise c1, c2 (not that we've made a c2)
> > and we could expect migration between different implementations all
> > that are backed by a Linux filesystem (if that file handle stuff is
> > portable); but we wouldn't expect a migration between c1 and c2 to work.
> > (and c2 might get split if there are different types of object store).
>
>
> If I understand this correctly, this requires the management layer to know
> the details of the backend before trying to live migrate the guest. Or do we
> need different feature bits for the above three types of the virtio-fs
> device?
Yep, something would need to know the details of the backend; but that's
true of most existing backends anyway; e.g. in virtio-net the management
layer understands the underlying network and what it has to setup on the
destination to ensure the network on both sides looks the same; it's got
different implications but it does still need to know it.
Dave
>
> >
> > So, just because there are different types of backends, doesn't mean we
> > have to give up standardisation; we just have to acknowledge there's
> > a range of backends and standardisethe bits we can.
>
>
> Right.
>
> Thanks
>
>
> >
> > Dave
> >
> > >
> > > > Dave
> > > >
> > > > > > I prefer to support in-band migration of implementation-specific state
> > > > > > because it's less complex to have a single device state instead of
> > > > > > splitting it.
> > > > > I wonder how to deal with migration compatibility in this case.
> > > > >
> > > > >
> > > > > > Is this the direction you were thinking in?
> > > > > Somehow.
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > > > > Stefan
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2021-08-05 8:19 UTC|newest]
Thread overview: 114+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 4:33 [PATCH V2 0/2] Vitqueue State Synchronization Jason Wang
2021-07-06 4:33 ` [PATCH V2 1/2] virtio: introduce virtqueue state as basic facility Jason Wang
2021-07-06 9:32 ` Michael S. Tsirkin
2021-07-06 17:09 ` Eugenio Perez Martin
2021-07-06 19:08 ` Michael S. Tsirkin
2021-07-06 23:49 ` Max Gurtovoy
2021-07-07 2:50 ` Jason Wang
2021-07-07 12:03 ` Max Gurtovoy
2021-07-07 2:42 ` Jason Wang
2021-07-07 4:36 ` Jason Wang
2021-07-07 2:41 ` Jason Wang
2021-07-06 12:27 ` [virtio-comment] " Cornelia Huck
2021-07-07 3:29 ` [virtio-dev] " Jason Wang
2021-07-06 4:33 ` [PATCH V2 2/2] virtio: introduce STOP status bit Jason Wang
2021-07-06 9:24 ` [virtio-comment] " Dr. David Alan Gilbert
2021-07-07 3:20 ` Jason Wang
2021-07-09 17:23 ` Eugenio Perez Martin
2021-07-10 20:36 ` Michael S. Tsirkin
2021-07-12 4:00 ` Jason Wang
2021-07-12 9:57 ` Stefan Hajnoczi
2021-07-13 3:27 ` Jason Wang
2021-07-13 8:19 ` Cornelia Huck
2021-07-13 9:13 ` Jason Wang
2021-07-13 11:31 ` Cornelia Huck
2021-07-13 12:23 ` Jason Wang
2021-07-13 12:28 ` Cornelia Huck
2021-07-14 2:47 ` Jason Wang
2021-07-14 6:20 ` Cornelia Huck
2021-07-14 8:53 ` Jason Wang
2021-07-14 9:24 ` [virtio-dev] " Cornelia Huck
2021-07-15 2:01 ` Jason Wang
2021-07-13 10:00 ` Stefan Hajnoczi
2021-07-13 12:16 ` Jason Wang
2021-07-14 9:53 ` Stefan Hajnoczi
2021-07-14 10:29 ` Jason Wang
2021-07-14 15:07 ` Stefan Hajnoczi
2021-07-14 16:22 ` Max Gurtovoy
2021-07-15 1:38 ` Jason Wang
2021-07-15 9:26 ` Stefan Hajnoczi
2021-07-16 1:48 ` Jason Wang
2021-07-19 12:08 ` Stefan Hajnoczi
2021-07-20 2:46 ` Jason Wang
2021-07-15 21:18 ` Michael S. Tsirkin
2021-07-16 2:19 ` Jason Wang
2021-07-15 1:35 ` Jason Wang
2021-07-15 9:16 ` [virtio-dev] " Stefan Hajnoczi
2021-07-16 1:44 ` Jason Wang
2021-07-19 12:18 ` [virtio-dev] " Stefan Hajnoczi
2021-07-20 2:50 ` Jason Wang
2021-07-20 10:31 ` Cornelia Huck
2021-07-21 2:59 ` Jason Wang
2021-07-15 10:01 ` Stefan Hajnoczi
2021-07-16 2:03 ` Jason Wang
2021-07-16 3:53 ` Jason Wang
2021-07-19 12:45 ` Stefan Hajnoczi
2021-07-20 3:04 ` Jason Wang
2021-07-20 8:50 ` Stefan Hajnoczi
2021-07-20 10:48 ` Cornelia Huck
2021-07-20 12:47 ` Stefan Hajnoczi
2021-07-21 2:29 ` Jason Wang
2021-07-21 10:20 ` Stefan Hajnoczi
2021-07-22 7:33 ` Jason Wang
2021-07-22 10:24 ` Stefan Hajnoczi
2021-07-22 13:08 ` Jason Wang
2021-07-26 15:07 ` Stefan Hajnoczi
2021-07-27 7:43 ` Max Reitz
2021-08-03 6:33 ` Jason Wang
2021-08-03 10:37 ` Stefan Hajnoczi
2021-08-03 11:42 ` Jason Wang
2021-08-03 12:22 ` Dr. David Alan Gilbert
2021-08-04 1:42 ` Jason Wang
2021-08-04 9:07 ` Dr. David Alan Gilbert
2021-08-05 6:38 ` Jason Wang
2021-08-05 8:19 ` Dr. David Alan Gilbert [this message]
2021-08-06 6:15 ` Jason Wang
2021-08-08 9:31 ` Max Gurtovoy
2021-08-04 9:20 ` Stefan Hajnoczi
2021-08-05 6:45 ` Jason Wang
2021-08-04 8:38 ` Stefan Hajnoczi
2021-08-04 8:36 ` Stefan Hajnoczi
2021-08-05 6:35 ` Jason Wang
2021-07-19 12:43 ` Stefan Hajnoczi
2021-07-20 3:02 ` Jason Wang
2021-07-20 10:19 ` Stefan Hajnoczi
2021-07-21 2:52 ` Jason Wang
2021-07-21 10:42 ` Stefan Hajnoczi
2021-07-22 2:08 ` Jason Wang
2021-07-22 10:30 ` Stefan Hajnoczi
2021-07-20 12:27 ` Max Gurtovoy
2021-07-20 12:57 ` Stefan Hajnoczi
2021-07-20 13:09 ` Max Gurtovoy
2021-07-21 3:06 ` Jason Wang
2021-07-21 10:48 ` Stefan Hajnoczi
2021-07-21 11:37 ` Max Gurtovoy
2021-07-21 3:09 ` Jason Wang
2021-07-21 11:43 ` Max Gurtovoy
2021-07-22 2:01 ` Jason Wang
2021-07-12 3:53 ` Jason Wang
2021-07-06 12:50 ` [virtio-comment] " Cornelia Huck
2021-07-06 13:18 ` Jason Wang
2021-07-06 14:27 ` [virtio-dev] " Cornelia Huck
2021-07-07 0:05 ` Max Gurtovoy
2021-07-07 3:14 ` Jason Wang
2021-07-07 2:56 ` Jason Wang
2021-07-07 16:45 ` [virtio-comment] " Cornelia Huck
2021-07-08 4:06 ` Jason Wang
2021-07-09 17:35 ` Eugenio Perez Martin
2021-07-12 4:06 ` Jason Wang
2021-07-10 20:40 ` Michael S. Tsirkin
2021-07-12 4:04 ` Jason Wang
2021-07-12 10:12 ` [PATCH V2 0/2] Vitqueue State Synchronization Stefan Hajnoczi
2021-07-13 3:08 ` Jason Wang
2021-07-13 10:30 ` Stefan Hajnoczi
2021-07-13 11:56 ` Jason Wang
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=YQufELMuQ83V3C+i@work-vm \
--to=dgilbert@redhat.com \
--cc=amikheev@nvidia.com \
--cc=bodong@nvidia.com \
--cc=cohuck@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=mgurtovoy@nvidia.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=oren@nvidia.com \
--cc=parav@nvidia.com \
--cc=pasic@linux.ibm.com \
--cc=shahafs@nvidia.com \
--cc=stefanha@redhat.com \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.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