On Tue, Jun 04, 2019 at 02:17:27PM +0800, Wei Yang wrote: > 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.y...@linux.intel.com> > Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com>
Thanks for updating the comments. Acked-by: Peter Xu <pet...@redhat.com> -- Peter Xu