[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] add live dumping capability
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] add live dumping capability |
Date: |
Fri, 10 Jul 2009 10:32:10 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 |
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
- Re: [Qemu-devel] [PATCH 2/3] move vm stop/start to migrate_set_state, (continued)
- Re: [Qemu-devel] [PATCH 2/3] move vm stop/start to migrate_set_state, Avi Kivity, 2009/07/12
- Re: [Qemu-devel] [PATCH 2/3] move vm stop/start to migrate_set_state, Gleb Natapov, 2009/07/13
- Re: [Qemu-devel] [PATCH 2/3] move vm stop/start to migrate_set_state, Gleb Natapov, 2009/07/13
- Re: [Qemu-devel] [PATCH 2/3] move vm stop/start to migrate_set_state, Anthony Liguori, 2009/07/13
- Re: [Qemu-devel] [PATCH 2/3] move vm stop/start to migrate_set_state, Dor Laor, 2009/07/14
- Re: [Qemu-devel] [PATCH 2/3] move vm stop/start to migrate_set_state, Paolo Bonzini, 2009/07/14
[Qemu-devel] [PATCH 3/3] add live dumping capability, Paolo Bonzini, 2009/07/09
Re: [Qemu-devel] [PATCH 0/3] add "core dump"-like capability, Anthony Liguori, 2009/07/09