提交 663e6c1d 编写于 作者: D Dr. David Alan Gilbert 提交者: Juan Quintela

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: NDr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
Reviewed-by: NJuan Quintela <quintela@redhat.com>
Reviewed-by: NAmit Shah <amit.shah@redhat.com>
Signed-off-by: NJuan Quintela <quintela@redhat.com>
上级 c53b7ddc
...@@ -1846,7 +1846,9 @@ static int ram_save_complete(QEMUFile *f, void *opaque) ...@@ -1846,7 +1846,9 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
{ {
rcu_read_lock(); rcu_read_lock();
migration_bitmap_sync(); if (!migration_in_postcopy(migrate_get_current())) {
migration_bitmap_sync();
}
ram_control_before_iterate(f, RAM_CONTROL_FINISH); 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, ...@@ -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; 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(); qemu_mutex_lock_iothread();
rcu_read_lock(); rcu_read_lock();
migration_bitmap_sync(); migration_bitmap_sync();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册