aboutsummaryrefslogtreecommitdiff
path: root/arch_init.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-08-13 09:53:12 +0200
committerJuan Quintela <quintela@redhat.com>2012-10-17 18:34:58 +0200
commit2c52ddf1cb3057bc2c6ae256857077627f6da43a (patch)
tree21abb5231954799f23ec4c88f2cec9fd5277745e /arch_init.c
parent859bc7569a2d244ee6183a99b71186462049ca86 (diff)
migration: print expected downtime in info migrate
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'arch_init.c')
-rw-r--r--arch_init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch_init.c b/arch_init.c
index 1d6dda8449..3fddb38179 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -539,6 +539,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
int ret;
int i;
uint64_t expected_downtime;
+ MigrationState *s = migrate_get_current();
bytes_transferred_last = bytes_transferred;
bwidth = qemu_get_clock_ns(rt_clock);
@@ -593,6 +594,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
if (expected_downtime <= migrate_max_downtime()) {
memory_global_sync_dirty_bitmap(get_system_memory());
expected_downtime = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
+ s->expected_downtime = expected_downtime / 1000000; /* ns -> ms */
return expected_downtime <= migrate_max_downtime();
}