summaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-11-05 18:11:13 +0000
committerJuan Quintela <quintela@redhat.com>2015-11-10 15:00:28 +0100
commit663e6c1df8721960c0a3bb6cd5dd047b610c3bad (patch)
treecf4887145a980bbc0a7e667bf65e0bb5003f4e88 /migration
parentc53b7ddc61198c4af8290d6310592e48e3507c47 (diff)
downloadqemu-663e6c1df8721960c0a3bb6cd5dd047b610c3bad.tar.gz
qemu-663e6c1df8721960c0a3bb6cd5dd047b610c3bad.tar.bz2
qemu-663e6c1df8721960c0a3bb6cd5dd047b610c3bad.zip
Don't sync dirty bitmaps in postcopy
Once we're in postcopy the source processors are stopped and memory shouldn't change any more, so there's no need to look at the dirty map. There are two notes to this: 1) If we do resync and a page had changed then the page would get sent again, which the destination wouldn't allow (since it might have also modified the page) 2) Before disabling this I'd seen very rare cases where a page had been marked dirtied although the memory contents are apparently identical Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/ram.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 8bf0841fad..339b001daf 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1846,7 +1846,9 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
{
rcu_read_lock();
- migration_bitmap_sync();
+ if (!migration_in_postcopy(migrate_get_current())) {
+ migration_bitmap_sync();
+ }
ram_control_before_iterate(f, RAM_CONTROL_FINISH);
@@ -1881,7 +1883,8 @@ static void ram_save_pending(QEMUFile *f, void *opaque, uint64_t max_size,
remaining_size = ram_save_remaining() * TARGET_PAGE_SIZE;
- if (remaining_size < max_size) {
+ if (!migration_in_postcopy(migrate_get_current()) &&
+ remaining_size < max_size) {
qemu_mutex_lock_iothread();
rcu_read_lock();
migration_bitmap_sync();