Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> On Tue, Jul 24, 2012 at 08:36:29PM +0200, Juan Quintela wrote:>> From: Umesh Deshpande <udeshpan@redhat.com>>> >> 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.