From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aueBm-0007yA-Md for qemu-devel@nongnu.org; Mon, 25 Apr 2016 06:56:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aueBj-0002dP-Dp for qemu-devel@nongnu.org; Mon, 25 Apr 2016 06:56:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aueBj-0002dF-6j for qemu-devel@nongnu.org; Mon, 25 Apr 2016 06:56:23 -0400 Date: Mon, 25 Apr 2016 13:56:15 +0300 From: "Michael S. Tsirkin" Message-ID: <20160425134648-mutt-send-email-mst@redhat.com> References: <20160324165530-mutt-send-email-mst@redhat.com> <20160324175503-mutt-send-email-mst@redhat.com> <20160324181031-mutt-send-email-mst@redhat.com> <20160324174933.GA11662@work-vm> <20160418142704-mutt-send-email-mst@redhat.com> <20160419191202.GI2255@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160419191202.GI2255@work-vm> Subject: Re: [Qemu-devel] [RFC Design Doc]Speed up live migration by skipping free pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: "Li, Liang Z" , Wei Yang , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kenel.org" , "pbonzini@redhat.com" , "rth@twiddle.net" , "ehabkost@redhat.com" , "amit.shah@redhat.com" , "quintela@redhat.com" , "mohan_parthasarathy@hpe.com" , "jitendra.kolhe@hpe.com" , "simhan@hpe.com" , "rkagan@virtuozzo.com" , "riel@redhat.com" On Tue, Apr 19, 2016 at 08:12:02PM +0100, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (mst@redhat.com) wrote: > > On Mon, Apr 18, 2016 at 11:08:31AM +0000, Li, Liang Z wrote: > > > Hi Dave, > > > > > > I am now working on how to benefit post-copy by skipping the free pages, > > > and I remember you have said we should let the destination know the info > > > of free pages so as to avoid request the free pages from the source. > > > > > > We have two solutions: > > > > > > a. send the migration dirty page bitmap to destination before post > > > copy start, so the destination can decide whether to request the pages or > > > place zero pages by checking the migration dirty page bitmap. The advantage > > > is that we can avoid sending the free pages. the disadvantage is that we have > > > to send extra data to destination. > > > > > > b. Check the page request on the source side, if it's not a dirty page, send a zero > > > page header to the destination. > > > > > > What's your opinion about them? > > > > > > Liang > > > > > > > Both are ad-hoc solutions imho. > > > > c. put the bitmap in a ramblock, check it on destination before > > requesting pages. > > > > This way it's migrated on-demand. > > I can see where you're coming from, but I don't like this idea, because > sending data controlling the RAM migration process in RAM blocks controlled > by the same data just sounds too recursive to ever debug. > > Dave Thinking some more about it, we could send the request for page from desination to guest. Once we get free pages, we send them to source with a flag that says "I don't really need these pages". Could be a new message with a bitmap, or just multiple existing ones that request pages. source marks these pages sent without actually sending them. if it sees it sent all pages it exits as previously. > > > > -- > > MST > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK