diff options
author | Juan Quintela <quintela@redhat.com> | 2012-07-20 10:52:51 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2012-10-17 18:34:58 +0200 |
commit | dd2df737ef3930f6d88116520d6ca7ff3cf0c41f (patch) | |
tree | eb4d39c91410092dc0765077f0cb0bc6f38e267d /arch_init.c | |
parent | 652d7ec291d1726ad01587e13331d7277fa402ec (diff) | |
download | qemu-dd2df737ef3930f6d88116520d6ca7ff3cf0c41f.tar.gz qemu-dd2df737ef3930f6d88116520d6ca7ff3cf0c41f.tar.bz2 qemu-dd2df737ef3930f6d88116520d6ca7ff3cf0c41f.zip |
ram: introduce migration_bitmap_sync()
Helper that we use each time that we need to syncronize the migration
bitmap with the other dirty bitmaps.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch_init.c')
-rw-r--r-- | arch_init.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch_init.c b/arch_init.c index 90a722e6c9..3a5fecccc7 100644 --- a/arch_init.c +++ b/arch_init.c @@ -356,6 +356,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 * @@ -613,7 +619,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 */ @@ -624,7 +630,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 */ |