From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: peterx@redhat.com, "Daniel P . Berrangé" <berrange@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Avihai Horon" <avihaih@nvidia.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Leonardo Bras Soares Passos" <lsoaresp@redhat.com>
Subject: [PATCH 0/2] migration: switchover-hold flag
Date: Fri, 2 Jun 2023 10:47:13 -0400 [thread overview]
Message-ID: <20230602144715.249002-1-peterx@redhat.com> (raw)
This v1 patchset is based on Juan's latest pull request:
[PULL 00/10] Migration 20230602 patches
git: https://gitlab.com/juan.quintela/qemu.git tags/migration-20230602-pull-request
Based-on: <20230602104910.35157-1-quintela@redhat.com>
The solution is heavily based on the original idea from Daniel, however the
impl is done by a new flag introduced which could be hopefully cleaner
approach.
Comparing to RFC version, this v1:
- Dropped the RFC tag, rebased to Juan's recent pull request so patch 2 dropped
- In the last patch, start to set bw=0 by default for all tests
- Enhanced commit messages / comments
A new flag "switchover-hold" is added to allow src qemu explicitly hold
switchover for precopy migration. Note that this flag will not affect
postcopy switchover because src qemu already has migrate-start-postcopy,
which is a finer grained knob just for that. In general this flag only
affects reaching migration completion phase, when set it'll block it from
happening while keep the migration iteration going.
This can be used in two cases so far in my mind:
(1) One can use this parameter to start pre-heating migration (but not
really migrating, so a migrate-cancel will cancel the preheat). When
the user wants to really migrate, just clear the flag. It'll in most
cases migrate immediately because most pages are already synced.
(2) Can also be used as a clean way to do qtest, in many of the precopy
tests we have requirement to run after 1 iteration without completing
the precopy migration. Before that we have either set bandwidth to
ridiculous low value, or tricks on detecting guest memory change over
some adhoc guest memory position. Now we can simply set this flag
then we know precopy won't complete and will just keep going.
The 1st use case may look a bit like COLO where we can actually keep both
QEMU _mostly_ in sync. I'm not sure whether it can be useful anywhere,
though.
Patch 1 will introduce the new flag.
Patch 2 will leverage the new flag to speed up migration-test. An initial
test is this can make migration-test finish within a little bit more than
1m.
Please have a look, thanks.
Peter Xu (2):
migration: switchover-hold parameter
qtest/migration: Use switchover-hold to speedup
qapi/migration.json | 25 +++++++++++++--
migration/migration.h | 16 ++++++++++
migration/migration-hmp-cmds.c | 3 ++
migration/migration.c | 56 ++++++++++++++++++++++++++++++++--
migration/options.c | 17 +++++++++++
tests/qtest/migration-test.c | 24 +++++++++++----
6 files changed, 129 insertions(+), 12 deletions(-)
--
2.40.1
next reply other threads:[~2023-06-02 14:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 14:47 Peter Xu [this message]
2023-06-02 14:47 ` [PATCH 1/2] migration: switchover-hold parameter Peter Xu
2023-06-05 12:27 ` Avihai Horon
2023-06-05 16:06 ` Peter Xu
2023-06-06 12:34 ` Avihai Horon
2023-06-06 15:58 ` Peter Xu
2023-06-02 14:47 ` [PATCH 2/2] qtest/migration: Use switchover-hold to speedup Peter Xu
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=20230602144715.249002-1-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=avihaih@nvidia.com \
--cc=berrange@redhat.com \
--cc=lsoaresp@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=thuth@redhat.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).