From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKVhB-0005z7-Vc for qemu-devel@nongnu.org; Thu, 12 May 2011 09:12:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKVhB-00041l-2d for qemu-devel@nongnu.org; Thu, 12 May 2011 09:12:49 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:51506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKVhA-00041h-Vr for qemu-devel@nongnu.org; Thu, 12 May 2011 09:12:49 -0400 Received: by ywl41 with SMTP id 41so598754ywl.4 for ; Thu, 12 May 2011 06:12:47 -0700 (PDT) Message-ID: <4DCBDCCD.4070600@codemonkey.ws> Date: Thu, 12 May 2011 08:12:45 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4DCA9097.7000609@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Add warmup phase for live migration of large memory apps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Shribman, Aidan" Cc: "qemu-devel@nongnu.org" , "quintela@redhat.com" On 05/12/2011 06:23 AM, Shribman, Aidan wrote: >> 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: > > --- > 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()); > } This is better but let's make sure to document this behavior (and please include a Signed-off-by: in the next patch). Regards, Anthony Liguori > static inline void *host_from_stream_offset(QEMUFile *f, > --- > > Best, > Aidan