[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv2 8/9] migration: do not search dirty pages in bulk
From: |
Peter Lieven |
Subject: |
[Qemu-devel] [PATCHv2 8/9] migration: do not search dirty pages in bulk stage |
Date: |
Fri, 15 Mar 2013 16:50:17 +0100 |
avoid searching for dirty pages just increment the
page offset. all pages are dirty anyway.
Signed-off-by: Peter Lieven <address@hidden>
---
arch_init.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index a3dc20d..ca281ad 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -321,8 +321,14 @@ ram_addr_t
migration_bitmap_find_and_reset_dirty(MemoryRegion *mr,
unsigned long nr = base + (start >> TARGET_PAGE_BITS);
unsigned long size = base + (int128_get64(mr->size) >> TARGET_PAGE_BITS);
- unsigned long next = find_next_bit(migration_bitmap, size, nr);
-
+ unsigned long next;
+
+ if (ram_bulk_stage) {
+ next = nr + 1;
+ } else {
+ next = find_next_bit(migration_bitmap, size, nr);
+ }
+
if (next < size) {
clear_bit(next, migration_bitmap);
migration_dirty_pages--;
@@ -523,7 +529,7 @@ static void reset_ram_globals(void)
{
last_seen_block = NULL;
last_sent_block = NULL;
- last_offset = 0;
+ last_offset = -1;
last_version = ram_list.version;
ram_bulk_stage = true;
}
--
1.7.9.5