* [Qemu-devel] [PATCH] live migration: Serialize vmstate saving in stage 2
@ 2009-12-01 14:19 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2009-12-01 14:19 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Liran Schour, Pierre Riteau
The effect of this patch with current block migration is that its stage
2, ie. the first full walk-through of the block devices will be
performed completely before RAM migration starts. This ensures that
continuously changing RAM pages are not re-synchronized all the time
while block migration is not completed.
Future versions of block migration which will respect the specified
downtime will generate a different pattern: After RAM migration has
started as well, block migration may also continue to inject dirty
blocks into the RAM stream once it detects that the number of pending
blocks would extend the downtime unacceptably.
Note that all this relies on the current registration order: block
before RAM migration.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
savevm.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/savevm.c b/savevm.c
index 3fee38c..930543e 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1293,7 +1293,14 @@ int qemu_savevm_state_iterate(Monitor *mon, QEMUFile *f)
qemu_put_byte(f, QEMU_VM_SECTION_PART);
qemu_put_be32(f, se->section_id);
- ret &= !!se->save_live_state(mon, f, QEMU_VM_SECTION_PART, se->opaque);
+ ret = se->save_live_state(mon, f, QEMU_VM_SECTION_PART, se->opaque);
+ if (!ret) {
+ /* Do not proceed to the next vmstate before this one reported
+ completion of the current stage. This serializes the migration
+ and reduces the probability that a faster changing state is
+ synchronized over and over again. */
+ break;
+ }
}
if (ret)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-01 14:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 14:19 [Qemu-devel] [PATCH] live migration: Serialize vmstate saving in stage 2 Jan Kiszka
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).