qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 12/41] ram: introduce migration_bitmap_sync()


From: Juan Quintela
Subject: [Qemu-devel] [PATCH 12/41] ram: introduce migration_bitmap_sync()
Date: Fri, 21 Sep 2012 10:47:06 +0200

Helper that we use each time that we need to syncronize the migration
bitmap with the other dirty bitmaps.

Signed-off-by: Juan Quintela <address@hidden>
---
 arch_init.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch_init.c b/arch_init.c
index acc057f..a58e8c3 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -357,6 +357,12 @@ static inline void migration_bitmap_set_dirty(MemoryRegion 
*mr, int length)
     }
 }

+static void migration_bitmap_sync(void)
+{
+    memory_global_sync_dirty_bitmap(get_system_memory());
+}
+
+
 /*
  * ram_save_block: Writes a page of memory to the stream f
  *
@@ -614,7 +620,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
             expected_downtime, migrate_max_downtime());

     if (expected_downtime <= migrate_max_downtime()) {
-        memory_global_sync_dirty_bitmap(get_system_memory());
+        migration_bitmap_sync();
         expected_downtime = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
         s->expected_downtime = expected_downtime / 1000000; /* ns -> ms */

@@ -625,7 +631,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)

 static int ram_save_complete(QEMUFile *f, void *opaque)
 {
-    memory_global_sync_dirty_bitmap(get_system_memory());
+    migration_bitmap_sync();

     /* try transferring iterative blocks of memory */

-- 
1.7.11.4




reply via email to

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