diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2015-11-11 14:02:27 +0000 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2015-11-12 17:52:29 +0100 |
commit | 1c0d249ddf3c75c3992847d0af67f79a1cfd23d2 (patch) | |
tree | 62174193bfdc725959c8f843fcc97b8ee3fce105 /migration/migration.c | |
parent | 80e60c6e1c417aa50a4fed1cb1a2f73885be3bef (diff) | |
download | hqemu-1c0d249ddf3c75c3992847d0af67f79a1cfd23d2.zip hqemu-1c0d249ddf3c75c3992847d0af67f79a1cfd23d2.tar.gz |
Finish non-postcopiable iterative devices before package
Where we have iterable, but non-postcopiable devices (e.g. htab
or block migration), complete them before forming the 'package'
but with the CPUs stopped. This stops them filling up the package.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/migration/migration.c b/migration/migration.c index c5c977e..5df490a 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1429,6 +1429,12 @@ static int postcopy_start(MigrationState *ms, bool *old_vm_running) } /* + * Cause any non-postcopiable, but iterative devices to + * send out their final data. + */ + qemu_savevm_state_complete_precopy(ms->file, true); + + /* * in Finish migrate and with the io-lock held everything should * be quiet, but we've potentially still got dirty pages and we * need to tell the destination to throw any pages it's already received @@ -1471,7 +1477,7 @@ static int postcopy_start(MigrationState *ms, bool *old_vm_running) */ qemu_savevm_send_postcopy_listen(fb); - qemu_savevm_state_complete_precopy(fb); + qemu_savevm_state_complete_precopy(fb, false); qemu_savevm_send_ping(fb, 3); qemu_savevm_send_postcopy_run(fb); @@ -1538,7 +1544,7 @@ static void migration_completion(MigrationState *s, int current_active_state, ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); if (ret >= 0) { qemu_file_set_rate_limit(s->file, INT64_MAX); - qemu_savevm_state_complete_precopy(s->file); + qemu_savevm_state_complete_precopy(s->file, false); } } qemu_mutex_unlock_iothread(); |