From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPBWn-0005Mj-OX for qemu-devel@nongnu.org; Fri, 10 Jul 2009 04:32:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPBWi-0005GC-Oo for qemu-devel@nongnu.org; Fri, 10 Jul 2009 04:32:20 -0400 Received: from [199.232.76.173] (port=54821 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPBWi-0005Fs-Lh for qemu-devel@nongnu.org; Fri, 10 Jul 2009 04:32:16 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50370) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MPBWi-00047O-8L for qemu-devel@nongnu.org; Fri, 10 Jul 2009 04:32:16 -0400 Message-ID: <4A56FC8A.3030700@redhat.com> Date: Fri, 10 Jul 2009 10:32:10 +0200 From: Paolo Bonzini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/3] add live dumping capability References: <1247140059-5034-1-git-send-email-pbonzini@redhat.com> <1247140059-5034-4-git-send-email-pbonzini@redhat.com> <4A55F57B.3030306@codemonkey.ws> <4A55F95A.8080409@redhat.com> <4A560213.4000106@codemonkey.ws> In-Reply-To: <4A560213.4000106@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On 07/09/2009 04:43 PM, Anthony Liguori wrote: > Paolo Bonzini wrote: >>>> With the previous cleanups in place, it is easy to trigger >>>> restart when the state machine goes from the COMPLETING to the >>>> COMPLETED state. Besides this, the patch is just simple >>>> scaffolding for the monitor command and to migrate to a file >>>> rather than a pipe (which is a bit simpler because we do not >>>> need non-blocking I/O). >>> >>> Then this isn't live migration. >> >> Sorry, I cannot understand this remark. > > You're using blocking I/O which will cause the guest to pause while disk > I/O is happening. Unfortunately non-blocking I/O does not work with files (it works with named pipes of course, so it would have been a good idea to keep it): $ cat f.c #include #include #include int main() { int f = open("f.txt", O_CREAT|O_WRONLY, 0666); fcntl (f, F_SETFL, fcntl (f, F_GETFL) | O_NONBLOCK); char *m = malloc (1 << 28); write (f, m, 1 << 28); } $ gcc f.c $ strace ./a.out open("f.txt", O_WRONLY|O_CREAT, 0666) = 3 fcntl(3, F_GETFL) = O_WRONLY|O_LARGEFILE fcntl(3, F_SETFL, O_WRONLY|O_NONBLOCK|O_LARGEFILE) = 0 mmap(NULL, 268439552, ...) = 0x7f73634db000 write(3, "\0"..., 268435456) = 268435456 $ Anyway, 3/3 is withdrawn since as far as libvirt is concerned I can use migrate+cont. Do you have any comments on 1/3 and 2/3 to include them as cleanups, or you prefer to go with just your small patch to fix the unconditional restart after an error? Paolo