qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 04/12] memory: Don't set migration bitmap whe


From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH v3 04/12] memory: Don't set migration bitmap when without migration
Date: Sat, 1 Jun 2019 10:41:15 +0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri, May 31, 2019 at 03:01:29PM +0200, Juan Quintela wrote:
> Peter Xu <address@hidden> 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 <address@hidden>
> > Signed-off-by: Peter Xu <address@hidden>
> 
> Reviewed-by: Juan Quintela <address@hidden>
> 
> 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

[Prev in Thread] Current Thread [Next in Thread]