migration: Fix migration state update issue
PATCH 1/1 migration: Fix migration state update issue
If live migration is very fast and can be completed in 1 second, the dirty_sync_count of MigrationState will not be updated. Then you will see "dirty sync count: 0" in qemu monitor even if the actual dirty sync count is not 0.
--- arch_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch_init.c +1 -1
@@ -599,8 +599,8 @@ static void migration_bitmap_sync(void) s->dirty_bytes_rate = s->dirty_pages_rate *TARGET_PAGE_SIZE ; start_time = end_time; num_dirty_pages_period =0 ; - s->dirty_sync_count = bitmap_sync_count; } + s->dirty_sync_count = bitmap_sync_count; }/**
Signature · 1 line
1.9.1
Quoted 15 lines · * Liang Li ([email protected]) wrote:
If live migration is very fast and can be completed in 1 second, the
dirty_sync_countof MigrationState will not be updated. Then you will see "dirty sync count: 0" in qemu monitor even if the actual dirty sync count is not 0.Signed-off-by Liang Li <[email protected]>--- arch_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch_init.c +0
-0
arch_init.c static void migration_bitmap_sync(void) · line 604
Quoted 7 lines
arch_init.c +1
-1@@ -599,8 +599,8 @@ static void migration_bitmap_sync(void) s->dirty_bytes_rate = s->dirty_pages_rate *TARGET_PAGE_SIZE ; start_time = end_time; num_dirty_pages_period =0 ; - s->dirty_sync_count = bitmap_sync_count; } + s->dirty_sync_count = bitmap_sync_count; }
Yes, makes sense.
(An interesting question is why there needs to be a separate bitmap_sync_count variable that's separate from s->dirty_sync_count)
Dave
Quoted 6 lines
arch_init.c +0
-0/** Signature · 1 line
1.9.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 6 lines · Liang Li
If live migration is very fast and can be completed in 1 second, the
dirty_sync_countof MigrationState will not be updated. Then you will see "dirty sync count: 0" in qemu monitor even if the actual dirty sync count is not 0.Signed-off-by Liang Li <[email protected]>
Added to new pull request, thanks.
Quoted 18 lines
--- arch_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch_init.c +1
-1@@ -599,8 +599,8 @@ static void migration_bitmap_sync(void) s->dirty_bytes_rate = s->dirty_pages_rate *TARGET_PAGE_SIZE ; start_time = end_time; num_dirty_pages_period =0 ; - s->dirty_sync_count = bitmap_sync_count; } + s->dirty_sync_count = bitmap_sync_count; }/**