qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Avihai Horon <avihaih@nvidia.com>
Cc: qemu-devel@nongnu.org, "Cédric Le Goater" <clg@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Leonardo Bras" <leobras@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Yishai Hadas" <yishaih@nvidia.com>,
	"Jason Gunthorpe" <jgg@nvidia.com>,
	"Maor Gottlieb" <maorg@nvidia.com>,
	"Kirti Wankhede" <kwankhede@nvidia.com>,
	"Tarun Gupta" <targupta@nvidia.com>,
	"Joao Martins" <joao.m.martins@oracle.com>
Subject: Re: [PATCH v5 2/9] migration: Implement switchover ack logic
Date: Thu, 8 Jun 2023 12:32:38 -0600	[thread overview]
Message-ID: <20230608123238.46e460ab.alex.williamson@redhat.com> (raw)
In-Reply-To: <2377a8be-9c60-8455-b735-bed18f0ba238@nvidia.com>

On Tue, 6 Jun 2023 15:12:13 +0300
Avihai Horon <avihaih@nvidia.com> wrote:
> On 06/06/2023 1:06, Alex Williamson wrote:
> > On Tue, 30 May 2023 17:48:14 +0300
> > Avihai Horon <avihaih@nvidia.com> wrote:
> >> @@ -2700,6 +2713,20 @@ static void migration_update_counters(MigrationState *s,
> >>                                 bandwidth, s->threshold_size);
> >>   }
> >>
> >> +static bool migration_can_switchover(MigrationState *s)
> >> +{
> >> +    if (!migrate_switchover_ack()) {
> >> +        return true;
> >> +    }
> >> +
> >> +    /* No reason to wait for switchover ACK if VM is stopped */
> >> +    if (!runstate_is_running()) {
> >> +        return true;
> >> +    }  
> > Is it possible for QEMU to force the migration to continue regardless
> > of receiving an ack from the target and is this the check that would
> > allow that?  
> 
> Yes. If you stop the source VM then migration will not wait for an ACK 
> to do the switchover.
> 
> >
> > It seems that we don't know the downtime allowed for the VM in any of
> > this, nor do we know how much time the target device will require to
> > generate an ack, but we could certainly have conditions where the
> > priority is moving the VM from the source host regardless of the
> > resulting downtime.  
> 
> In such cases you can keep the switchover-ack capability off.

How is that accomplished?

> > Also does the return path requirement preclude offline migration or
> > does the above again take care of that if we pause the VM for an
> > offline migration (ex. save to and restore from file)?  
> 
> I suppose that by offline migration you mean migration where you stop 
> the source VM first and then do migration?

Yes.

> If so, offline migration should work and in that case we don't care 
> about the ACK as downtime is not a concern.
> 
> However, migrating to a file doesn't work with return-path, as you don't 
> have the destination side responding to the source via the return path.
> For this reason, using return-path when migrating to a file doesn't make 
> sense.

So we require return-path for switchover-ack, but switchover-ack is
only required for pre-copy, therefore why do we require return-path for
an offline migration?

If there's a way to turn off switchover-ack capability, is there also a
way to turn off return-path and therefore enable migration to file?
Sorry if I'm simply not familiar with these migration switches.  Thanks,

Alex



  reply	other threads:[~2023-06-08 18:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 14:48 [PATCH v5 0/9] migration: Add switchover ack capability and VFIO precopy support Avihai Horon
2023-05-30 14:48 ` [PATCH v5 1/9] migration: Add switchover ack capability Avihai Horon
2023-06-15 12:38   ` YangHang Liu
2023-06-15 13:49     ` Cédric Le Goater
2023-06-19  9:37       ` Avihai Horon
2023-05-30 14:48 ` [PATCH v5 2/9] migration: Implement switchover ack logic Avihai Horon
2023-06-05 22:06   ` Alex Williamson
2023-06-06 12:12     ` Avihai Horon
2023-06-08 18:32       ` Alex Williamson [this message]
2023-06-11  7:45         ` Avihai Horon
2023-05-30 14:48 ` [PATCH v5 3/9] migration: Enable switchover ack capability Avihai Horon
2023-05-30 14:48 ` [PATCH v5 4/9] tests: Add migration switchover ack capability test Avihai Horon
2023-05-30 14:48 ` [PATCH v5 5/9] vfio/migration: Refactor vfio_save_block() to return saved data size Avihai Horon
2023-05-30 14:48 ` [PATCH v5 6/9] vfio/migration: Store VFIO migration flags in VFIOMigration Avihai Horon
2023-05-30 14:48 ` [PATCH v5 7/9] vfio/migration: Add VFIO migration pre-copy support Avihai Horon
2023-05-30 14:48 ` [PATCH v5 8/9] vfio/migration: Add x-allow-pre-copy VFIO device property Avihai Horon
2023-06-01 20:22   ` Alex Williamson
2023-06-04  9:33     ` Avihai Horon
2023-06-05 14:56       ` Alex Williamson
2023-06-06 11:59         ` Avihai Horon
2023-06-06 13:40           ` Cédric Le Goater
2023-06-07  7:41             ` Avihai Horon
2023-05-30 14:48 ` [PATCH v5 9/9] vfio/migration: Add support for switchover ack capability Avihai Horon
2023-05-30 15:15   ` Cédric Le Goater
2023-06-16  9:35 ` [PATCH v5 0/9] migration: Add switchover ack capability and VFIO precopy support YangHang Liu

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=20230608123238.46e460ab.alex.williamson@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=armbru@redhat.com \
    --cc=avihaih@nvidia.com \
    --cc=clg@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=jgg@nvidia.com \
    --cc=joao.m.martins@oracle.com \
    --cc=kwankhede@nvidia.com \
    --cc=leobras@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=maorg@nvidia.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=targupta@nvidia.com \
    --cc=thuth@redhat.com \
    --cc=wangyanan55@huawei.com \
    --cc=yishaih@nvidia.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).