From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlJN3-0002io-3w for qemu-devel@nongnu.org; Tue, 26 Nov 2013 09:12:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlJMt-0002Go-Al for qemu-devel@nongnu.org; Tue, 26 Nov 2013 09:12:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlJMs-0002GR-R6 for qemu-devel@nongnu.org; Tue, 26 Nov 2013 09:11:59 -0500 Message-ID: <5294AC22.2020105@redhat.com> Date: Tue, 26 Nov 2013 15:11:46 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1385025100-3191-1-git-send-email-lilei@linux.vnet.ibm.com> <1385025100-3191-17-git-send-email-lilei@linux.vnet.ibm.com> <529486B5.90500@redhat.com> <52948E18.6070503@linux.vnet.ibm.com> <52949A19.1010307@redhat.com> <5294A7EC.4060501@linux.vnet.ibm.com> In-Reply-To: <5294A7EC.4060501@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lei Li Cc: aarcange@redhat.com, quintela@redhat.com, mdroth@linux.vnet.ibm.com, mrhines@linux.vnet.ibm.com, qemu-devel@nongnu.org, aliguori@amazon.com, lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com Il 26/11/2013 14:53, Lei Li ha scritto: > 1) ram_save_setup stage, it will send all the bytes in this stages > to destination, and send_pipefd by ram_control_before_iterate > at the end of it. ram_save_setup runs doesn't send anything from guest RAM. It sends the lengths of the various blocks. As you said, at the end of ram_save_setup you send the pipefd. ram_save_iterate runs before ram_save_complete. ram_save_iterate and ram_save_complete write data with exactly the same format. Both of them can use ram_save_page It should not matter if some pages are sent as part of ram_save_iterate and others as part of ram_save_complete. One possibility is that you are hitting a bug due to the way you ignore the "0x01" byte that send_pipefd places on the socket. >> Oops. I might have said this before thinking about postcopy and/or >> before seeing the benchmark results from Juan's patches. If this part >> of the patch is just an optimization, I'd rather leave it out for now. > > I am afraid that page flipping can not proceed correctly without this.. I really would like to understand why, because it really shouldn't (this shouldn't be a place where you need a hook). Paolo