qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] migration: switchover-hold flag
@ 2023-06-06 16:52 Peter Xu
  2023-06-06 16:52 ` [PATCH v2 1/2] migration: switchover-hold parameter Peter Xu
  2023-06-06 16:52 ` [PATCH v2 2/2] qtest/migration: Use switchover-hold to speedup Peter Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Xu @ 2023-06-06 16:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Laurent Vivier, Leonardo Bras Soares Passos,
	Avihai Horon, Daniel P . Berrangé, peterx, Eric Blake,
	Juan Quintela, Thomas Huth, Markus Armbruster

This v2 patchset is based on master.  Since I'm not sure how long this
series will take for review, we could probably apply Dan's previous patch
10 first, then when I repost I can provide a revert patch when needed.

v2:
- Make the flag transparent to postcopy [Avihai]
- Fix qapi/ indents to 70 cols, copy Markus, Eric too [Avihai]
- Adjusted postcopy test, see patch 2 for details (because patch 1 now
  don't influence postcopy anymore, due to this the test runs slightly
  faster than v1 but hopefully provides better coverage on postcopy)

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 less 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   | 39 +++++++++++++++++------
 6 files changed, 140 insertions(+), 16 deletions(-)

-- 
2.40.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-06 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06 16:52 [PATCH v2 0/2] migration: switchover-hold flag Peter Xu
2023-06-06 16:52 ` [PATCH v2 1/2] migration: switchover-hold parameter Peter Xu
2023-06-06 16:52 ` [PATCH v2 2/2] qtest/migration: Use switchover-hold to speedup Peter Xu

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).