All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Pierre Riteau <pierre.riteau@irisa.fr>
Cc: Liran Schour <lirans@il.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 00/23] block migration: Fixes, cleanups and speedups
Date: Mon, 30 Nov 2009 20:44:51 +0100	[thread overview]
Message-ID: <4B1420B3.3030404@web.de> (raw)
In-Reply-To: <3E8317F1-756A-4986-BA69-FD836B5DAA52@irisa.fr>

[-- Attachment #1: Type: text/plain, Size: 4396 bytes --]

Pierre Riteau wrote:
> On 30 nov. 2009, at 20:25, Jan Kiszka wrote:
> 
>> Pierre Riteau wrote:
>>> On 30 nov. 2009, at 19:34, Anthony Liguori wrote:
>>>
>>>> Jan Kiszka wrote:
>>>>> This series is a larger rework of the block migration support qemu
>>>>> recently gained. Besides lots of code refactorings the major changes
>>>>> are:
>>>>> - Faster restore due to larger block sizes (even if the target disk is
>>>>>  unallocated)
>>>>> - Off-by-one fixes in the block dirty tracking code
>>>>> - Allow for multiple migrations (after cancellation or if migrating
>>>>>  into a backup image)
>>>>> - Proper error handling
>>>>> - Progress reporting fixes: report to monitor instead of stdout, report
>>>>>  sum of multiple disks
>>>>> - Report disk migration progress via 'info migrate'
>>>>> - Progress report during restore
>>>>>
>>>>> One patch is directly taken from Pierre Riteau queue [1] who happend to
>>>>> work on the some topic the last days, two more are derived from his
>>>>> commits.
>>>>>
>>>>> These patches make block migration usable for us. Still, there are two
>>>>> more major improvements on my wish/todo list:
>>>>> - Respect specified maximum migration downtime (will require tracking
>>>>>  of the number of dirty blocks + some coordination with ram migration)
>>>>> - Do not transfere unallocated disk space (also for raw images, ie. add
>>>>>  bdrv_is_allocated support for the latter)
>>>>>
>>>>> In an off-list chat, Liran additionally brought up the topic that RAM
>>>>> migration should not start too early so that we avoid re-transmitting
>>>>> dirty pages over and over again while the disk image is slowly beamed
>>>>> over.
>>>>>
>>>>> I hope we can join our efforts to resolve the open topics quickly, the
>>>>> critical ones ideally before the merge window closes.
>>>>>
>>>> That really needs to happen no later than the end of this week.
>>>>
>>>> So Pierre/Liran, what do you think about Jan's series?
>>>>
>>>> Regards,
>>>>
>>>> Anthony Liguori
>>>
>>> I'm currently testing these patches. Here are a few issues I noticed, before I forget about them.
>>>
>>> - "migrate -d -b tcp:dest:port" works, but "migrate -b -d tcp:dest:port" doesn't, although "help migrate" doesn't really specify ordering as important. But anyway I think Liran is working on a new version of the command.
>> Saw that too. I think the monitor commands simply do very primitive
>> option parsing so far. Should be addressed if the final format comes
>> with this issue as well.
>>
>>> - We use bdrv_aio_readv() to read blocks from the disk. This function increments rd_bytes and rd_ops, which are reported by "info blockstats". I don't think this read operations should appear in VM activity, especially if this interface is used by libvirt to report VM stats (and draw graphs in virt-manager, etc.). Same for write stats.
>> Ack.
>>
>>> - We may need to call bdrv_reset_dirty() _before_ sending the data, to be sure the block is not rewritten in the meantime (maybe it's an issue only with kvm?)
>> Can you elaborate? Even in case of multi-threaded qemu, the iomutex
>> should protect us here.
> 
> I only said that because I remember seeing this kind of behavior, but with ram migration on kvm.
> As I'm not familiar with the I/O emulation in qemu, if you say that it's OK, no problem.

RAM is different as RAM access need not be synchronized across the vcpus
and the iothread.

> 
> By multi-threaded, are you talking about the IO thread feature?

Yes (which also includes per vcpu threads).

> 
>>> - I seem to remember that disk images with 0 size are now possible. I'm afraid we will hit a divide by zero in this case: "progress = completed_sector_sum * 100 / block_mig_state.total_sector_sum;"
>> Although I don't see their use, it should be handled gracefully, likely
>> by skipping such disks.
> 
> From a patch by Stefan Weil a few weeks ago:
> 
>> Images with disk size 0 may be used for
>> VM snapshots, but not to save normal block data.
>>
>> It is possible to create such images using
>> qemu-img, but opening them later fails.
>>
>> So even "qemu-img info image.qcow2" is not
>> possible for an image created with
>> "qemu-img create -f qcow2 image.qcow2 0".
> 
> I'm not sure if that concerns us...
> 

Good point. Then my add-on patch is definitely required.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2009-11-30 19:44 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30 17:21 [Qemu-devel] [PATCH 00/23] block migration: Fixes, cleanups and speedups Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 02/23] migration: Catch multiple start commands Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 01/23] migration: Fix use of file after release Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 03/23] block migration: Fix coding style and whitespaces Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 04/23] block migration: Rework constants API Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 09/23] Import a simple queue implementation from NetBSD Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 11/23] block migration: Initialize remaining BlkMigState fields Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 13/23] block migration: Consolidate mig_read_device_bulk into mig_save_device_bulk Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 08/23] block migration: Drop dead code Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 12/23] block migration: Clean up use of total_sectors Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 10/23] block migration: Switch device and block lists to QSIMPLEQ Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 05/23] block migration: Cleanup dirty tracking code Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 07/23] block migration: Avoid indirection of block_mig_state Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 06/23] block migration: Avoid large stack buffer Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 14/23] block migration: Consolidate block transmission Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 18/23] block migration: Report overall migration progress Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 16/23] ram migration: Stop loading on error Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 21/23] block migration: Report progress also via info migration Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 19/23] live migration: Propagate output monitor to callback handler Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 17/23] live migration: Allow cleanup after cancellation or error Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 20/23] block migration: Fix outgoing progress output Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 22/23] block migration: Add support for restore progress reporting Jan Kiszka
2009-12-01 14:20   ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2009-12-01 17:01     ` [Qemu-devel] " Pierre Riteau
2009-12-01 17:17       ` Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 15/23] block migration: Add error handling/propagation Jan Kiszka
2009-11-30 17:21 ` [Qemu-devel] [PATCH 23/23] block migration: Increase dirty chunk size to 1M Jan Kiszka
2009-11-30 18:34 ` [Qemu-devel] [PATCH 00/23] block migration: Fixes, cleanups and speedups Anthony Liguori
2009-11-30 18:50   ` Pierre Riteau
2009-11-30 19:23     ` Pierre Riteau
2009-11-30 19:34       ` [Qemu-devel] [PATCH 24/23] block migration: Skip zero-sized disks Jan Kiszka
2009-11-30 19:25     ` [Qemu-devel] [PATCH 00/23] block migration: Fixes, cleanups and speedups Jan Kiszka
2009-11-30 19:34       ` Pierre Riteau
2009-11-30 19:44         ` Jan Kiszka [this message]
2009-11-30 18:50   ` Jan Kiszka

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=4B1420B3.3030404@web.de \
    --to=jan.kiszka@web.de \
    --cc=lirans@il.ibm.com \
    --cc=pierre.riteau@irisa.fr \
    --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.