Skip to content

Commit b4ead90

Browse files
BenjaminChaneyMichael Tokarev
authored andcommitted
migration: Don't sync volatile memory after migration completes
Syncing volatile memory provides no benefit, instead it can cause performance issues in some cases. Only sync memory that is marked as non-volatile after migration completes on destination. Signed-off-by: Ben Chaney <[email protected]> Fixes: bd108a4 (migration: ram: Switch to ram block writeback) Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Peter Xu <[email protected]> (cherry picked from commit 983899eab4939dc4dff67fa4d822c5b4df7eae21) Signed-off-by: Michael Tokarev <[email protected]>
1 parent a4e31f5 commit b4ead90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

migration/ram.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3598,7 +3598,9 @@ static int ram_load_cleanup(void *opaque)
35983598
RAMBlock *rb;
35993599

36003600
RAMBLOCK_FOREACH_NOT_IGNORED(rb) {
3601-
qemu_ram_block_writeback(rb);
3601+
if (memory_region_is_nonvolatile(rb->mr)) {
3602+
qemu_ram_block_writeback(rb);
3603+
}
36023604
}
36033605

36043606
xbzrle_load_cleanup();

0 commit comments

Comments
 (0)