]> git.proxmox.com Git - mirror_qemu.git/commit
migratioin/ram: leave RAMBlock->bmap blank on allocating
authorWei Yang <richardw.yang@linux.intel.com>
Tue, 4 Jun 2019 06:17:27 +0000 (14:17 +0800)
committerJuan Quintela <quintela@redhat.com>
Wed, 5 Jun 2019 10:44:03 +0000 (12:44 +0200)
commit03158519384f15890d587937bd1b3ea699898e55
tree8b1c1b98b65a755b8a802eb1fc1278100e196975
parent24d5588c86faa245220ea821c9bc7ec685ffa97c
migratioin/ram: leave RAMBlock->bmap blank on allocating

During migration, we would sync bitmap from ram_list.dirty_memory to
RAMBlock.bmap in cpu_physical_memory_sync_dirty_bitmap().

Since we set RAMBlock.bmap and ram_list.dirty_memory both to all 1, this
means at the first round this sync is meaningless and is a duplicated
work.

Leaving RAMBlock->bmap blank on allocating would have a side effect on
migration_dirty_pages, since it is calculated from the result of
cpu_physical_memory_sync_dirty_bitmap(). To keep it right, we need to
set migration_dirty_pages to 0 in ram_state_init().

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/ram.c