From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ0ji-0005uf-TJ for qemu-devel@nongnu.org; Tue, 02 Oct 2012 07:34:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJ0jc-0007dN-GK for qemu-devel@nongnu.org; Tue, 02 Oct 2012 07:34:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ0jc-0007dC-6V for qemu-devel@nongnu.org; Tue, 02 Oct 2012 07:33:56 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q92BXtex019572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Oct 2012 07:33:55 -0400 From: Juan Quintela Date: Tue, 2 Oct 2012 13:33:07 +0200 Message-Id: <1349177616-5341-13-git-send-email-quintela@redhat.com> In-Reply-To: <1349177616-5341-1-git-send-email-quintela@redhat.com> References: <1349177616-5341-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH 12/41] ram: introduce migration_bitmap_sync() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Helper that we use each time that we need to syncronize the migration bitmap with the other dirty bitmaps. Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- arch_init.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index 90a722e..3a5fecc 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 */ -- 1.7.11.4