qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC][PATCH 0/3] Fix caching issues with live migration


From: Avi Kivity
Subject: Re: [Qemu-devel] [RFC][PATCH 0/3] Fix caching issues with live migration
Date: Sun, 12 Sep 2010 12:46:52 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Lightning/1.0b2pre Thunderbird/3.1.2

 On 09/11/2010 05:04 PM, Anthony Liguori wrote:
Today, live migration only works when using shared storage that is fully
cache coherent using raw images.

The failure case with weak coherent (i.e. NFS) is subtle but nontheless still
exists.  NFS only guarantees close-to-open coherence and when performing a live
migration, we do an open on the source and an open on the destination.  We
fsync() on the source before launching the destination but since we have two
simultaneous opens, we're not guaranteed coherence.

This is not necessarily a problem except that we are a bit gratituous in reading
from the disk before launching a guest.  This means that as things stand today,
we're guaranteed to read the first 64k of the disk and as such, if a client
writes to that region during live migration, corruption will result.

The second failure condition has to do with image files (such as qcow2).  Today,
we aggressively cache metadata in all image formats and that cache is definitely
not coherent even with fully coherent shared storage.

In all image formats, we prefetch at least the L1 table in open() which means
that if there is a write operation that causes a modification to an L1 table,
corruption will ensue.

This series attempts to address both of these issue.  Technically, if a NFS
client aggressively prefetches this solution is not enough but in practice,
Linux doesn't do that.

I think it is unlikely that it will, but I prefer to be on the right side of the standards. Why not delay image open until after migration completes? I know your concern about the image not being there, but we can verify that with access(). If the image is deleted between access() and open() then the user has much bigger problems.

Note that on NFS, removing (and I think chmoding) a file after it is opened will cause subsequent data access to fail, unlike posix.

--
error compiling committee.c: too many arguments to function




reply via email to

[Prev in Thread] Current Thread [Next in Thread]