From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] add file: migration support
Date: Wed, 12 Nov 2008 21:06:32 -0600 [thread overview]
Message-ID: <491B99B8.9010504@codemonkey.ws> (raw)
In-Reply-To: <gfg1l8$b56$1@ger.gmane.org>
Charles Duffy wrote:
> This patch adds support for migration to and from file: targets, moves
> common helpers between exec: and file: use cases from migration-exec.c
> to migration.c, and adds a qemu_fdopen() helper parallel to qemu_fopen().
>
> Signed-off-by: Charles Duffy <charles_duffy@messageone.com>
> diff --git a/.gitignore b/.gitignore
> index e70ebab..8e28325 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -30,4 +30,4 @@ qemu-nbd.8
> *.tp
> *.vr
> *.d
> -
> +*.o
>
Please keep this sort of stuff separate from a general patch.
> + s->fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0666);
> + if (s->fd == -1) {
> + perror("Unable to open migration target");
> + goto err_after_alloc;
> + }
> +
> + if (fcntl(s->fd, F_SETFD, O_NONBLOCK) == -1) {
> + dprintf("Unable to set nonblocking mode on file descriptor\n");
> + goto err_after_open;
> + }
>
Did you mean F_SETFL?
At any rate, this doesn't do what you think it does. O_NONBLOCK still
blocks with a file. To implement a proper file: migration protocol, you
have to use something like posix-aio to write to the file asychronously.
You can observe the problem here by setting the migration data limit to
something very, very high (like 10GB). That will cause the VM to become
unresponsive until all the data is on disk which is certainly not live
migration.
Regards,
Anthony Liguori
prev parent reply other threads:[~2008-11-13 3:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-13 1:59 [Qemu-devel] [PATCH] add file: migration support Charles Duffy
2008-11-13 2:31 ` [Qemu-devel] " Charles Duffy
2008-11-13 3:06 ` Anthony Liguori [this message]
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=491B99B8.9010504@codemonkey.ws \
--to=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).