From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuKEr-0001Gr-RX for qemu-devel@nongnu.org; Thu, 26 Jul 2012 05:20:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuKEk-0005kH-4u for qemu-devel@nongnu.org; Thu, 26 Jul 2012 05:20:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuKEj-0005i2-TV for qemu-devel@nongnu.org; Thu, 26 Jul 2012 05:20:02 -0400 From: Juan Quintela In-Reply-To: <20120725232757.GB2708@illuin> (Michael Roth's message of "Wed, 25 Jul 2012 18:27:57 -0500") References: <1343155012-26316-1-git-send-email-quintela@redhat.com> <1343155012-26316-5-git-send-email-quintela@redhat.com> <20120725232757.GB2708@illuin> Date: Thu, 26 Jul 2012 11:19:09 +0200 Message-ID: <87ipdarib6.fsf@elfo.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 04/27] add a version number to ram_list Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: Paolo Bonzini , Umesh Deshpande , qemu-devel@nongnu.org Michael Roth wrote: > On Tue, Jul 24, 2012 at 08:36:29PM +0200, Juan Quintela wrote: >> From: Umesh Deshpande >> >> This will be used to detect if last_block might have become invalid >> across different calls to ram_save_live. > > Was it a bug in the old code to not do this? In the unthreaded version > it looks like last_block could still become invalid between iterations if it > was removed in the meantime, so I'm trying to understand why it's needed > now. Old code assumed that we _never_ do hotplug/unplug of anything during migration (I am still not convinced that everything works if we plug some devices, but now at least memory works). > And why do we re-sort when this happens? The old implementation didn't > seem to place any guarantees on the block ordering beyond the initial > sorting by block->idstr. After that they were sent in MRU order. It is a "subtle" attempt to try to get the memory in order when we suspend to disk. So we could compare two files done while we were stopped. And no, I didn't liked when it was introduced. Later, Juan.