[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC 0/3] migration: switchover-hold flag
From: |
Peter Xu |
Subject: |
[PATCH RFC 0/3] migration: switchover-hold flag |
Date: |
Thu, 1 Jun 2023 21:16:23 -0400 |
This RFC patchset is based on Daniel's recent refactoring on migration-test:
20230601161347.1803440-1-berrange@redhat.com">https://lore.kernel.org/r/20230601161347.1803440-1-berrange@redhat.com
Based-on: <20230601161347.1803440-1-berrange@redhat.com>
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 temprarily revert the last patch from Daniel's series, so
potentially this will temporarily make migration-test slow again. If we
want to avoid this we can merge patch 2 & 3 too.
Patch 3 will leverage the new flag to speed up migration-test. There're
still some difference comparing to Daniel's solution (e.g., we can still
wait for a whole iteration for each test since we run the initial 3MB also
with full bw). An initial test is this can make migration-test finish
within a little bit more than 1m.
Please have a look, thanks.
Peter Xu (3):
migration: switchover-hold parameter
Revert "tests/qtest: massively speed up migration-test"
qtest/migration: Use switchover-hold to speedup
qapi/migration.json | 25 ++++-
migration/migration.h | 7 ++
migration/migration-hmp-cmds.c | 3 +
migration/migration.c | 56 ++++++++++-
migration/options.c | 17 ++++
tests/qtest/migration-test.c | 163 +++++++--------------------------
6 files changed, 134 insertions(+), 137 deletions(-)
--
2.40.1
- [PATCH RFC 0/3] migration: switchover-hold flag,
Peter Xu <=