From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Yury Kotov <yury-kotov@yandex-team.ru>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
Eric Blake <eblake@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Richard Henderson <rth@twiddle.net>,
Thomas Huth <thuth@redhat.com>,
qemu-devel@nongnu.org, wrfsh@yandex-team.ru,
jiangshanlai@gmail.com, qemu-devel@lists.ewheeler.net,
peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH v3 2/5] migration: Introduce ignore-shared capability
Date: Wed, 20 Feb 2019 15:52:07 +0000 [thread overview]
Message-ID: <20190220155207.GJ2608@work-vm> (raw)
In-Reply-To: <20190215174548.2630-3-yury-kotov@yandex-team.ru>
* Yury Kotov (yury-kotov@yandex-team.ru) wrote:
> We want to use local migration to update QEMU for running guests.
> In this case we don't need to migrate shared (file backed) RAM.
> So, add a capability to ignore such blocks during live migration.
>
> Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> migration/migration.c | 14 ++++++++++++++
> migration/migration.h | 1 +
> qapi/migration.json | 5 ++++-
> 3 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 37e06b76dc..0fadd97fb9 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -957,6 +957,11 @@ static bool migrate_caps_check(bool *cap_list,
> error_setg(errp, "Postcopy is not supported");
> return false;
> }
> +
> + if (cap_list[MIGRATION_CAPABILITY_X_IGNORE_SHARED]) {
> + error_setg(errp, "Postcopy is not compatible with ignore-shared");
> + return false;
> + }
> }
>
> return true;
> @@ -1983,6 +1988,15 @@ bool migrate_dirty_bitmaps(void)
> return s->enabled_capabilities[MIGRATION_CAPABILITY_DIRTY_BITMAPS];
> }
>
> +bool migrate_ignore_shared(void)
> +{
> + MigrationState *s;
> +
> + s = migrate_get_current();
> +
> + return s->enabled_capabilities[MIGRATION_CAPABILITY_X_IGNORE_SHARED];
> +}
> +
> bool migrate_use_events(void)
> {
> MigrationState *s;
> diff --git a/migration/migration.h b/migration/migration.h
> index dcd05d9f87..4211995c53 100644
> --- a/migration/migration.h
> +++ b/migration/migration.h
> @@ -261,6 +261,7 @@ bool migrate_release_ram(void);
> bool migrate_postcopy_ram(void);
> bool migrate_zero_blocks(void);
> bool migrate_dirty_bitmaps(void);
> +bool migrate_ignore_shared(void);
>
> bool migrate_auto_converge(void);
> bool migrate_use_multifd(void);
> diff --git a/qapi/migration.json b/qapi/migration.json
> index 7a795ecc16..7105570cd3 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -409,13 +409,16 @@
> # devices (and thus take locks) immediately at the end of migration.
> # (since 3.0)
> #
> +# @x-ignore-shared: If enabled, QEMU will not migrate shared memory (since 4.0)
> +#
> # Since: 1.2
> ##
> { 'enum': 'MigrationCapability',
> 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
> 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
> 'block', 'return-path', 'pause-before-switchover', 'x-multifd',
> - 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate' ] }
> + 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
> + 'x-ignore-shared' ] }
>
> ##
> # @MigrationCapabilityStatus:
> --
> 2.20.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2019-02-20 15:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 17:45 [Qemu-devel] [PATCH v3 0/5] Add ignore-external migration capability Yury Kotov
2019-02-15 17:45 ` [Qemu-devel] [PATCH v3 1/5] exec: Change RAMBlockIterFunc definition Yury Kotov
2019-02-20 15:46 ` Dr. David Alan Gilbert
2019-02-15 17:45 ` [Qemu-devel] [PATCH v3 2/5] migration: Introduce ignore-shared capability Yury Kotov
2019-02-20 15:52 ` Dr. David Alan Gilbert [this message]
2019-02-15 17:45 ` [Qemu-devel] [PATCH v3 3/5] migration: Add an ability to ignore shared RAM blocks Yury Kotov
2019-02-20 16:48 ` Dr. David Alan Gilbert
2019-02-15 17:45 ` [Qemu-devel] [PATCH v3 4/5] tests/migration-test: Add a test for ignore-shared capability Yury Kotov
2019-02-20 17:12 ` Dr. David Alan Gilbert
2019-02-15 17:45 ` [Qemu-devel] [PATCH v3 5/5] migration: Add capabilities validation Yury Kotov
2019-02-20 17:37 ` Dr. David Alan Gilbert
2019-02-15 18:17 ` [Qemu-devel] [PATCH v3 0/5] Add ignore-external migration capability no-reply
2019-02-20 17:43 ` Dr. David Alan Gilbert
2019-02-15 18:21 ` no-reply
2019-02-20 17:42 ` Dr. David Alan Gilbert
2019-02-27 15:25 ` no-reply
2019-03-05 14:05 ` Dr. David Alan Gilbert
2019-03-05 18:06 ` Dr. David Alan Gilbert
2019-03-06 10:47 ` Yury Kotov
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=20190220155207.GJ2608@work-vm \
--to=dgilbert@redhat.com \
--cc=armbru@redhat.com \
--cc=crosthwaite.peter@gmail.com \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=jiangshanlai@gmail.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@lists.ewheeler.net \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
--cc=wrfsh@yandex-team.ru \
--cc=yury-kotov@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 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).