From: Jason Gunthorpe via <qemu-devel@nongnu.org>
To: Joao Martins <joao.m.martins@oracle.com>
Cc: quintela@redhat.com, Alex Williamson <alex.williamson@redhat.com>,
Eric Blake <eblake@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>,
qemu-s390x@nongnu.org, Cornelia Huck <cohuck@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
Laurent Vivier <lvivier@redhat.com>, John Snow <jsnow@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Halil Pasic <pasic@linux.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-block@nongnu.org, Eric Farman <farman@linux.ibm.com>,
Richard Henderson <richard.henderson@linaro.org>,
David Hildenbrand <david@redhat.com>,
Avihai Horon <avihaih@nvidia.com>,
qemu-devel@nongnu.org
Subject: Re: [RFC 7/7] migration: call qemu_savevm_state_pending_exact() with the guest stopped
Date: Tue, 18 Oct 2022 09:22:43 -0300 [thread overview]
Message-ID: <Y06ak0I3FacnkFKr@nvidia.com> (raw)
In-Reply-To: <a273f54e-d9d2-fae7-942b-641aa1a3ed3b@oracle.com>
On Fri, Oct 14, 2022 at 01:29:51PM +0100, Joao Martins wrote:
> On 14/10/2022 12:28, Juan Quintela wrote:
> > Joao Martins <joao.m.martins@oracle.com> wrote:
> >> On 13/10/2022 17:08, Juan Quintela wrote:
> >>> Oops. My understanding was that once the guest is stopped you can say
> >>> how big is it.
> >
> > Hi
> >
> >> It's worth keeping in mind that conceptually a VF won't stop (e.g. DMA) until
> >> really told through VFIO. So, stopping CPUs (guest) just means that guest code
> >> does not arm the VF for more I/O but still is a weak guarantee as VF still has
> >> outstanding I/O to deal with until VFIO tells it to quiesce DMA (for devices
> >> that support it).
> >
> > How can we make sure about that?
> >
> > i.e. I know I have a vfio device. I need two things:
> > - in the iterative stage, I eed to check the size, but a estimate is ok.
> > for example with RAM, we use whatever is the size of the dirty bitmap
> > at that moment.
> > If the estimated size is smaller than the theshold, we
> > * stop the guest
> > * sync dirty bitmap
> > * now we test the (real) dirty bitmap size
> >
> > How can we do something like that with a vfio device.
> >
> You would have an extra intermediate step that stops the VF prior to asking
> the device state length. What I am not sure is whether stopping
> vCPUs can be skipped as an optimization.
It cannot, if you want to stop the VFIO device you must also stop the
vCPUs because the device is not required to respond properly to MMIO
operations when stopped.
> > My understanding from NVidia folks was that newer firmware have an ioctl
> > to return than information.
>
> Maybe there's something new. I was thinking from this here:
Juan is talking about the ioctl we had in the pre-copy series.
I expect it to come into some different form to support this RFC.
Jason
next prev parent reply other threads:[~2022-10-18 12:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 3:15 [RFC 0/7] migration patches for VFIO Juan Quintela
2022-10-03 3:15 ` [RFC 1/7] migration: Remove res_compatible parameter Juan Quintela
2022-11-22 13:54 ` Dr. David Alan Gilbert
2022-10-03 3:15 ` [RFC 2/7] migration: No save_live_pending() method uses the QEMUFile parameter Juan Quintela
2022-11-22 17:48 ` Dr. David Alan Gilbert
2022-10-03 3:15 ` [RFC 3/7] migration: Block migration comment or code is wrong Juan Quintela
2022-10-03 19:12 ` Stefan Hajnoczi
2022-10-03 3:15 ` [RFC 4/7] migration: Split save_live_pending() into state_pending_* Juan Quintela
2022-11-22 20:08 ` Dr. David Alan Gilbert
2022-10-03 3:15 ` [RFC 5/7] migration: Remove unused threshold_size parameter Juan Quintela
2022-11-23 16:38 ` Dr. David Alan Gilbert
2022-10-03 3:15 ` [RFC 6/7] migration: simplify migration_iteration_run() Juan Quintela
2022-11-23 17:39 ` Dr. David Alan Gilbert
2022-10-03 3:16 ` [RFC 7/7] migration: call qemu_savevm_state_pending_exact() with the guest stopped Juan Quintela
2022-10-13 12:25 ` Joao Martins
2022-10-13 16:08 ` Juan Quintela
2022-10-14 10:36 ` Joao Martins
2022-10-14 11:28 ` Juan Quintela
2022-10-14 12:29 ` Joao Martins
2022-10-18 12:22 ` Jason Gunthorpe via [this message]
2022-10-19 15:51 ` Yishai Hadas
2022-10-14 19:49 ` Jason Gunthorpe
2022-10-20 14:56 ` [RFC 0/7] migration patches for VFIO Yishai Hadas
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=Y06ak0I3FacnkFKr@nvidia.com \
--to=qemu-devel@nongnu.org \
--cc=alex.williamson@redhat.com \
--cc=avihaih@nvidia.com \
--cc=borntraeger@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=fam@euphon.net \
--cc=farman@linux.ibm.com \
--cc=jgg@nvidia.com \
--cc=joao.m.martins@oracle.com \
--cc=jsnow@redhat.com \
--cc=lvivier@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=quintela@redhat.com \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=vsementsov@yandex-team.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.