qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] add live dumping capability
Date: Fri, 10 Jul 2009 10:32:10 +0200	[thread overview]
Message-ID: <4A56FC8A.3030700@redhat.com> (raw)
In-Reply-To: <4A560213.4000106@codemonkey.ws>

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 <fcntl.h>
#include <stdlib.h>
#include <unistd.h>

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) = <after quite some time> 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

  reply	other threads:[~2009-07-10  8:32 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 11:47 [Qemu-devel] [PATCH 0/3] add "core dump"-like capability Paolo Bonzini
2009-07-09 11:47 ` [Qemu-devel] [PATCH 1/3] move state and mon_resume to struct MigrationState Paolo Bonzini
2009-07-09 11:47 ` [Qemu-devel] [PATCH 2/3] move vm stop/start to migrate_set_state Paolo Bonzini
2009-07-09 13:45   ` Anthony Liguori
2009-07-09 13:48     ` Paolo Bonzini
2009-07-09 13:53       ` Anthony Liguori
2009-07-09 13:58         ` Paolo Bonzini
2009-07-09 14:41           ` Anthony Liguori
2009-07-10 23:14         ` Jamie Lokier
2009-07-11  0:04           ` malc
2009-07-11  0:42             ` Jamie Lokier
2009-07-11  0:55             ` Anthony Liguori
2009-07-11  0:58           ` Anthony Liguori
2009-07-11  1:42             ` Jamie Lokier
2009-07-12  3:31               ` Anthony Liguori
2009-07-12 14:22                 ` Avi Kivity
2009-07-12 19:10                   ` Anthony Liguori
2009-07-12 19:30                     ` Avi Kivity
2009-07-13  5:31                     ` Gleb Natapov
2009-07-13  8:05                       ` Gleb Natapov
2009-07-13 14:52                       ` Anthony Liguori
2009-07-14  8:48                         ` Dor Laor
2009-07-14 14:41                           ` Paolo Bonzini
2009-07-09 11:47 ` [Qemu-devel] [PATCH 3/3] add live dumping capability Paolo Bonzini
2009-07-09 13:49   ` Anthony Liguori
2009-07-09 14:06     ` Paolo Bonzini
2009-07-09 14:43       ` Anthony Liguori
2009-07-10  8:32         ` Paolo Bonzini [this message]
2009-07-10 12:51           ` Anthony Liguori
2009-07-09 13:42 ` [Qemu-devel] [PATCH 0/3] add "core dump"-like capability Anthony Liguori
2009-07-09 13:46   ` Paolo Bonzini
2009-07-09 13:51     ` Anthony Liguori
2009-07-09 14:46     ` Gerd Hoffmann
2009-07-09 16:20       ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A56FC8A.3030700@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).