From: Jan Kiszka <jan.kiszka@siemens.com>
To: lirans@il.ibm.com
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 2/3 v5] Block live migration
Date: Thu, 26 Nov 2009 14:53:49 +0100 [thread overview]
Message-ID: <4B0E886D.60602@siemens.com> (raw)
In-Reply-To: <1257169258297-git-send-email-lirans@il.ibm.com>
lirans@il.ibm.com wrote:
> +static int block_load(QEMUFile *f, void *opaque, int version_id)
> +{
> + int len, flags;
> + char device_name[256];
> + int64_t addr;
> + BlockDriverState *bs;
> + uint8_t *buf;
> +
> + block_mig_state->sectors_per_block = bdrv_get_sectors_per_chunk();
> + buf = qemu_malloc(BLOCK_SIZE);
> +
> + do {
> +
> + addr = qemu_get_be64(f);
> +
> + flags = addr & ~SECTOR_MASK;
> + addr &= SECTOR_MASK;
> +
> + if(flags & BLK_MIG_FLAG_DEVICE_BLOCK) {
> +
> + /* get device name */
> + len = qemu_get_byte(f);
> +
> + qemu_get_buffer(f, (uint8_t *)device_name, len);
> + device_name[len] = '\0';
> +
> + bs = bdrv_find(device_name);
> +
> + qemu_get_buffer(f, buf,
> + BLOCK_SIZE);
> + if(bs != NULL) {
> +
> + bdrv_write(bs, (addr >> SECTOR_BITS),
> + buf, block_mig_state->sectors_per_block);
This synchronous write-back translates appears to be the reason for an
unusable migration (or restore from snapshot) speed: about 100 KB/s here
(ie. 22h for a rather small 8G guest :( ). Did you already try to
improve this situation?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2009-11-26 13:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-02 13:40 [Qemu-devel] [PATCH 2/3 v5] Block live migration lirans
2009-11-24 22:55 ` [Qemu-devel] " Jan Kiszka
2009-11-26 7:13 ` Liran Schour
2009-11-26 7:39 ` Jan Kiszka
2009-11-26 13:53 ` Jan Kiszka [this message]
2009-11-26 15:50 ` Liran Schour
2009-11-26 17:05 ` Jan Kiszka
2009-11-26 17:24 ` Jan Kiszka
2009-11-30 11:49 ` Liran Schour
2009-11-30 12:01 ` Jan Kiszka
2009-11-26 18:06 ` Pierre Riteau
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=4B0E886D.60602@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=lirans@il.ibm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.