From patchwork Thu May 12 11:23:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Add warmup phase for live migration of large memory apps Date: Thu, 12 May 2011 01:23:38 -0000 From: "Shribman, Aidan" X-Patchwork-Id: 95285 Message-Id: To: "quintela@redhat.com" Cc: "qemu-devel@nongnu.org" > From: Juan Quintela [mailto:quintela@redhat.com] > > > If there are no additional dirty pages to be sent > > i.e. ram_save_remaining() == 0 then the migration *will* converge > > (even though we don't want it to) see: > > This should be a really idle guest to have that O:-) > > But if that is the whole problem, I would change the code to make the > case of max_downtime == 0 to mean that migration didn't converge. > I agree this would be fine as surrogate for the warmup patch as I proposed. New patch based on your's / Anthony's suggestion: --- --- Best, Aidan diff --git a/arch_init.c b/arch_init.c index 4486925..9a35411 100644 --- a/arch_init.c +++ b/arch_init.c @@ -295,7 +295,8 @@ int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque) expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth; - return (stage == 2) && (expected_time <= migrate_max_downtime()); + return (stage == 2) && migrate_max_downtime() && + (expected_time <= migrate_max_downtime()); } static inline void *host_from_stream_offset(QEMUFile *f,