On Fri, May 31, 2019 at 03:01:29PM +0200, Juan Quintela wrote:
> Peter Xu <pet...@redhat.com> wrote:
> > Similar to 9460dee4b2 ("memory: do not touch code dirty bitmap unless
> > TCG is enabled", 2015-06-05) but for the migration bitmap - we can
> > skip the MIGRATION bitmap update if migration not enabled.
> >
> > Reviewed-by: Paolo Bonzini <pbonz...@redhat.com>
> > Signed-off-by: Peter Xu <pet...@redhat.com>
> 
> Reviewed-by: Juan Quintela <quint...@redhat.com>
> 
> But if we ever decide to _not_ dirty all the bitmap at start (only used
> pages) we need to fix this.

Right, but IMHO we can never avoid doing it, because kvm (and also the
per-ramblock dirty bitmaps) will only capture "dirtied pages" after
log sync has started.  One example is what if one page P is never been
touched after log_sync?  Then in kvm dirty log it'll never be set, and
the only way to make sure we will still migrate that page P (that
could be touched before log_sync so it might still contain valid data
rather than a zero page) is to dirty all the pages at the start of
migration (for now, it's ram_list_init_bitmaps).

Thanks for the review!

-- 
Peter Xu

Reply via email to