From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: migrate_set_downtime bug Date: Wed, 30 Sep 2009 13:39:51 -0300 Message-ID: <20090930163951.GD5149@mothafucka.localdomain> References: <90D306BE6EBC8D428A824FBBA7A3113DFDCDF175@ronja.maurer-it.com> <90D306BE6EBC8D428A824FBBA7A3113DFDCDF178@ronja.maurer-it.com> <90D306BE6EBC8D428A824FBBA7A3113DFDCDF179@ronja.maurer-it.com> <4AC22A4D.5060805@codemonkey.ws> <20090929162345.GX29735@mothafucka.localdomain> <90D306BE6EBC8D428A824FBBA7A3113DFDCDF17D@ronja.maurer-it.com> <20090930044832.GA5149@mothafucka.localdomain> <90D306BE6EBC8D428A824FBBA7A3113DFDCDF184@ronja.maurer-it.com> <20090930112328.GB5149@mothafucka.localdomain> <90D306BE6EBC8D428A824FBBA7A3113DFDCDF18D@ronja.maurer-it.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Anthony Liguori , kvm To: Dietmar Maurer Return-path: Received: from mx1.redhat.com ([209.132.183.28]:25696 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754134AbZI3Qjy (ORCPT ); Wed, 30 Sep 2009 12:39:54 -0400 Content-Disposition: inline In-Reply-To: <90D306BE6EBC8D428A824FBBA7A3113DFDCDF18D@ronja.maurer-it.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Sep 30, 2009 at 04:11:32PM +0200, Dietmar Maurer wrote: > > On Wed, Sep 30, 2009 at 10:55:24AM +0200, Dietmar Maurer wrote: > > > Another problem occur when max_downtime is too short. This can > > results in never ending migration task. > > > > > > To reproduce just play a video inside a VM and set max_downtime to > > 30ns > > > > > > Sure, one can argument that this behavior is expected. > > > > > > But the following would avoid the problem: > > > > > > + if ((stage == 2) && (bytes_transferred > 2*ram_bytes_total())) { > > > + return 1; > > > + } > > why 2 * ? > > This means we'll have to transfer the whole contents of RAM at least > > twice to hit this condition, right? > > Yes, this is just an arbitrary limit. I don't know. If we are going for a limit, I would prefere a limit of pages yet to transfer, not pages already transferred. However, the very reason this whole thing was written in the first place, was to leave choices to management tools ontop of qemu, not qemu itself. So I would say yes, if you set limit for 30ns, you asked for it never finishing. Your first patch is okay, tough.