[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/41] fix migration sync
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 02/41] fix migration sync |
Date: |
Fri, 21 Sep 2012 14:17:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
Il 21/09/2012 10:46, Juan Quintela ha scritto:
> Signed-off-by: Juan Quintela <address@hidden>
> ---
> arch_init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch_init.c b/arch_init.c
> index f849f9b..cdd8ab7 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -489,6 +489,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
> ram_addr_t addr;
> RAMBlock *block;
>
> + memory_global_sync_dirty_bitmap(get_system_memory());
Does it make sense to call this function before memory_global_dirty_log_start()?
Also, does this call subsume this loop:
QLIST_FOREACH(block, &ram_list.blocks, next) {
for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) {
if (!memory_region_get_dirty(block->mr, addr, TARGET_PAGE_SIZE,
DIRTY_MEMORY_MIGRATION)) {
memory_region_set_dirty(block->mr, addr, TARGET_PAGE_SIZE);
}
}
}
so that the right fix is
- QLIST_FOREACH(block, &ram_list.blocks, next) {
- for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) {
- if (!memory_region_get_dirty(block->mr, addr, TARGET_PAGE_SIZE,
- DIRTY_MEMORY_MIGRATION)) {
- memory_region_set_dirty(block->mr, addr, TARGET_PAGE_SIZE);
- }
- }
- }
-
memory_global_dirty_log_start();
+ memory_global_sync_dirty_bitmap(get_system_memory());
?
Paolo
> bytes_transferred = 0;
> last_block = NULL;
> last_offset = 0;
>