[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
- [Qemu-devel] [PATCH v3 00/12] kvm/migration: support KVM_CLEAR_DIRTY_LOG, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 01/12] checkpatch: Allow SPDX-License-Identifier, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 02/12] migration: No need to take rcu during sync_dirty_bitmap, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 03/12] memory: Remove memory_region_get_dirty(), Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 04/12] memory: Don't set migration bitmap when without migration, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 05/12] bitmap: Add bitmap_copy_with_{src|dst}_offset(), Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 06/12] memory: Pass mr into snapshot_and_clear_dirty, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 07/12] memory: Introduce memory listener hook log_clear(), Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 08/12] kvm: Update comments for sync_dirty_bitmap, Peter Xu, 2019/05/30
- [Qemu-devel] [PATCH v3 09/12] kvm: Persistent per kvmslot dirty bitmap, Peter Xu, 2019/05/30