aboutsummaryrefslogtreecommitdiff
path: root/migration/ram.c
diff options
context:
space:
mode:
authorLiang Li <liang.z.li@intel.com>2015-11-02 15:37:00 +0800
committerJuan Quintela <quintela@redhat.com>2015-11-04 13:40:13 +0100
commit94f5a43704129ca4995aa3385303c5ae225bde42 (patch)
tree84258ec091fadb00976a785a320c66211f58174d /migration/ram.c
parent79cf9fad341e6e7bd6b55395b71d5c5727d7f5b0 (diff)
migration: defer migration_end & blk_mig_cleanup
Because of the patch 3ea3b7fa9af067982f34b of kvm, which introduces a lazy collapsing of small sptes into large sptes mechanism, now migration_end() is a time consuming operation because it calls memroy_global_dirty_log_stop(), which will trigger the dropping of small sptes operation and takes about dozens of milliseconds, so call migration_end() before all the vmsate data has already been transferred to the destination will prolong VM downtime. This operation should be deferred after all the data has been transferred to the destination. blk_mig_cleanup() can be deferred too. For a VM with 8G RAM, this patch can reduce the VM downtime about 30 ms. Signed-off-by: Liang Li <liang.z.li@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>al3 Reviewed-by: Amit Shah <amit.shah@redhat.com>al3 Signed-off-by: Juan Quintela <quintela@redhat.com>al3
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/migration/ram.c b/migration/ram.c
index a25bcc7db1..25e9eebea6 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1344,7 +1344,6 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
rcu_read_unlock();
- migration_end();
qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
return 0;