qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Steve Sistare <steven.sistare@oracle.com>
Cc: qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>,
	Fabiano Rosas <farosas@suse.de>,
	Leonardo Bras <leobras@redhat.com>
Subject: Re: [PATCH V1 4/4] cpr: reboot mode
Date: Mon, 23 Oct 2023 11:39:24 -0400	[thread overview]
Message-ID: <ZTaTrEPcK2yU8MT5@x1n> (raw)
In-Reply-To: <1697748466-373230-5-git-send-email-steven.sistare@oracle.com>

On Thu, Oct 19, 2023 at 01:47:46PM -0700, Steve Sistare wrote:
> Add the cpr-reboot migration mode.  Usage:
> 
> $ qemu-system-$arch -monitor stdio ...
> QEMU 8.1.50 monitor - type 'help' for more information
> (qemu) migrate_set_capability x-ignore-shared on
> (qemu) migrate_set_parameter mode cpr-reboot
> (qemu) migrate -d file:vm.state
> (qemu) info status
> VM status: paused (postmigrate)
> (qemu) quit
> 
> $ qemu-system-$arch -monitor stdio -incoming defer ...
> QEMU 8.1.50 monitor - type 'help' for more information
> (qemu) migrate_set_capability x-ignore-shared on
> (qemu) migrate_set_parameter mode cpr-reboot
> (qemu) migrate_incoming file:vm.state
> (qemu) info status
> VM status: running
> 
> In this mode, the migrate command saves state to a file, allowing one
> to quit qemu, reboot to an updated kernel, and restart an updated version
> of qemu.  The caller must specify a migration URI that writes to and reads
> from a file.  Unlike normal mode, the use of certain local storage options
> does not block the migration, but the caller must not modify guest block
> devices between the quit and restart.  The guest RAM memory-backend must
> be shared, and the @x-ignore-shared migration capability must be set,
> to avoid saving RAM to the file.  Guest RAM must be non-volatile across
> reboot, such as by backing it with a dax device, but this is not enforced.
> The restarted qemu arguments must match those used to initially start qemu,
> plus the -incoming option.
> 
> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
> ---
>  qapi/migration.json | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/qapi/migration.json b/qapi/migration.json
> index 184fb78..2d862fa 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -620,9 +620,23 @@
>  #
>  # @normal: the original form of migration. (since 8.2)
>  #
> +# @cpr-reboot: The migrate command saves state to a file, allowing one to
> +#              quit qemu, reboot to an updated kernel, and restart an updated
> +#              version of qemu.  The caller must specify a migration URI
> +#              that writes to and reads from a file.  Unlike normal mode,
> +#              the use of certain local storage options does not block the
> +#              migration, but the caller must not modify guest block devices
> +#              between the quit and restart.  The guest RAM memory-backend
> +#              must be shared, and the @x-ignore-shared migration capability
> +#              must be set, to avoid saving it to the file.  Guest RAM must
> +#              be non-volatile across reboot, such as by backing it with
> +#              a dax device, but this is not enforced.  The restarted qemu
> +#              arguments must match those used to initially start qemu, plus
> +#              the -incoming option. (since 8.2)

What happens if someone migrates with non-shared memory, or without
ignore-shared?  Is it only because it'll be slow saving and loading?

If that's required, we should fail the mode set if (1) non-shared memory is
used, or (2) x-ignore-shared is not enabled.  But I had a feeling it's the
other way round.

Reading the whole series, if it's so far all about "local storage", why
"cpr-reboot"?  Why not "local" or "local storage" as the name?

I had a feeling that this patchset mixed a lot of higher level use case
into the mode definition.  IMHO we should provide clear definition of each
mode on what it does.  It's so far not so clear to me, even if I kind of
know what you plan to do.

I tried again google what CPR is for and found this:

https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg08541.html

I also prefer spell it out, at least make it clear on what that means..  I
didn't even see "Checkpoint/restart" words mentioned anywhere in this
patchset.

Besides: do you have a tree somewhere for the whole set of latest CPR work?

Thanks,

> +#
>  ##
>  { 'enum': 'MigMode',
> -  'data': [ 'normal' ] }
> +  'data': [ 'normal', 'cpr-reboot' ] }
>  
>  ##
>  # @BitmapMigrationBitmapAliasTransform:
> -- 
> 1.8.3.1
> 

-- 
Peter Xu



  parent reply	other threads:[~2023-10-23 15:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 20:47 [PATCH V1 0/4] Live Update reboot mode Steve Sistare
2023-10-19 20:47 ` [PATCH V1 1/4] migration: mode parameter Steve Sistare
2023-10-20  9:29   ` Juan Quintela
2023-10-20 14:08     ` Steven Sistare
2023-10-20 19:38       ` Juan Quintela
2023-10-20 22:14   ` Steven Sistare
2023-10-19 20:47 ` [PATCH V1 2/4] migration: per-mode blockers Steve Sistare
2023-10-20  9:36   ` Juan Quintela
2023-10-23 12:46   ` Daniel P. Berrangé
2023-10-23 14:37     ` Steven Sistare
2023-10-23 15:02       ` Daniel P. Berrangé
2023-10-23 18:29         ` Steven Sistare
2023-10-19 20:47 ` [PATCH V1 3/4] cpr: relax some blockers Steve Sistare
2023-10-20  9:38   ` Juan Quintela
2023-10-23 15:25     ` Peter Xu
2023-10-23 12:36   ` Daniel P. Berrangé
2023-10-19 20:47 ` [PATCH V1 4/4] cpr: reboot mode Steve Sistare
2023-10-20  9:45   ` Juan Quintela
2023-10-20 14:09     ` Steven Sistare
2023-10-20 19:40       ` Juan Quintela
2023-10-23 18:39         ` Steven Sistare
2023-10-24 11:13           ` Juan Quintela
2023-10-23 15:39   ` Peter Xu [this message]
2023-10-23 18:29     ` Steven Sistare
2023-10-23 18:51       ` Steven Sistare
2023-10-23 19:05         ` Peter Xu
2023-10-23 20:06           ` Steven Sistare
2023-10-19 21:18 ` [PATCH V1 0/4] Live Update " Steven Sistare
2023-10-20  9:23   ` Juan Quintela

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=ZTaTrEPcK2yU8MT5@x1n \
    --to=peterx@redhat.com \
    --cc=farosas@suse.de \
    --cc=leobras@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=steven.sistare@oracle.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).