qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC] migration: make sure to run iterate precopy during the bulk stage
@ 2018-08-29 13:40 Quan Xu
  2018-09-04  9:09 ` Dr. David Alan Gilbert
  2018-09-04  9:12 ` Juan Quintela
  0 siblings, 2 replies; 5+ messages in thread
From: Quan Xu @ 2018-08-29 13:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: quintela, dgilbert, kvm

 From 8dbf7370e7ea1caab0b769d0d4dcdd072d14d421 Mon Sep 17 00:00:00 2001
From: Quan Xu <quan.xu0@gmail.com>
Date: Wed, 29 Aug 2018 21:33:14 +0800
Subject: [PATCH RFC] migration: make sure to run iterate precopy during the
  bulk stage

Since the bulk stage assumes in (migration_bitmap_find_dirty) that every
page is dirty, return a rough total ram as pending size to make sure that
migration thread continues to run iterate precopy during the bulk stage.

Otherwise the downtime grows unpredictably, as migration thread needs to
send both the rest of pages and dirty pages during complete precopy.

Signed-off-by: Quan Xu <quan.xu0@gmail.com>
---
  migration/ram.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/migration/ram.c b/migration/ram.c
index 79c8942..cfa304c 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3308,7 +3308,8 @@ static void ram_save_pending(QEMUFile *f, void 
*opaque, uint64_t max_size,
          /* We can do postcopy, and all the data is postcopiable */
          *res_compatible += remaining_size;
      } else {
-        *res_precopy_only += remaining_size;
+        *res_precopy_only += (rs->ram_bulk_stage ?
+                              ram_bytes_total() : remaining_size);
      }
  }

--
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-04 13:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-29 13:40 [Qemu-devel] [PATCH RFC] migration: make sure to run iterate precopy during the bulk stage Quan Xu
2018-09-04  9:09 ` Dr. David Alan Gilbert
2018-09-04 13:34   ` Quan Xu
2018-09-04  9:12 ` Juan Quintela
2018-09-04 12:48   ` Quan Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).