Statistics
| Branch: | Revision:

root / block-migration.c @ 30c0c76c

History | View | Annotate | Download (16.8 kB)

# Date Author Comment
d76cac7d 02/10/2010 12:56 am Liran Schour

Tranfer dirty blocks during iterative phase

Start transfer dirty blocks during the iterative stage. That will
reduce the time that the guest will be suspended

Signed-off-by: Liran Schour <>
Signed-off-by: Anthony Liguori <>

889ae39c 02/10/2010 12:56 am Liran Schour

Try not to exceed max downtime on stage3

Move to stage3 only when remaining work can be done below max downtime.
Use qemu_get_clock_ns for measuring read performance.

Signed-off-by: Liran Schour <>
Signed-off-by: Anthony Liguori <>

e970ec0b 02/10/2010 12:56 am Liran Schour

Remove unused code

blk_mig_save_bulked_block is never called with sync flag. Remove the sync
flag. Calculate bulk completion during blk_mig_save_bulked_block.
Remove unused constants.

Signed-off-by: Liran Schour <>
Signed-off-by: Anthony Liguori <>

d0f2c4c6 02/07/2010 01:03 am malc

Do not use dprintf

dprintf is already claimed by POSIX1, and on at least one system
is implemented as a macro

[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html

Signed-off-by: malc <>

792773b2 12/03/2009 07:45 pm Jan Kiszka

block migration: Skip zero-sized disks

No need to migrate emptiness (risking divide by zero later on).

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

01e61e2d 12/03/2009 06:48 pm Jan Kiszka

block migration: Add support for restore progress reporting

Inject progress report in percentage into the block live stream. This
can be read out and displayed easily on restore.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

b1d10856 12/03/2009 06:48 pm Jan Kiszka

block migration: Clean up use of total_sectors

We already save total_sectors in BlkMigDevState, let's use this value
during the migration and avoid to recalculate it needlessly.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

57cce12d 12/03/2009 06:48 pm Jan Kiszka

block migration: Consolidate mig_read_device_bulk into mig_save_device_bulk

Both functions share a lot of code, so make them one.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

13f0b67f 12/03/2009 06:48 pm Jan Kiszka

block migration: Consolidate block transmission

Based on the original patch by Pierre Riteau: Use a common blk_send
function to transmit a block.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

4b640365 12/03/2009 06:48 pm Jan Kiszka

block migration: Add error handling/propagation

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

4ec7fcc7 12/03/2009 06:48 pm Jan Kiszka

live migration: Allow cleanup after cancellation or error

Introduce qemu_savevm_state_cancel and inject a stage -1 to cancel a
live migration. This gives the involved subsystems a chance to clean up
dynamically allocated resources. Namely, the block migration layer can...

82801d8f 12/03/2009 06:48 pm Jan Kiszka

block migration: Report overall migration progress

So far progress reporting only works for the first block device. Fix
this by keeping an overall sum of sectors to be migratated, calculating
the sum of all processed sectors, and finally basing the progress...

f327aa0c 12/03/2009 06:48 pm Jan Kiszka

live migration: Propagate output monitor to callback handler

In order to allow proper progress reporting to the monitor that
initiated the migration, forward the monitor reference through the
migration layer down to SaveLiveStateHandler.

Signed-off-by: Jan Kiszka <>...

7184049e 12/03/2009 06:48 pm Jan Kiszka

block migration: Fix outgoing progress output

Report progress of an outgoing live migration to the monitor instead of
stdout.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

25f23643 12/03/2009 06:48 pm Jan Kiszka

block migration: Report progress also via info migration

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

a55eb92c 12/03/2009 06:48 pm Jan Kiszka

block migration: Fix coding style and whitespaces

No functional changes.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

6ea44308 12/03/2009 06:48 pm Jan Kiszka

block migration: Rework constants API

Instead of duplicating the definition of constants or introducing
trivial retrieval functions move the SECTOR constants into the public
block API. This also obsoletes sector_per_block in BlkMigState.

Signed-off-by: Jan Kiszka <>...

575a58d7 12/03/2009 06:48 pm Jan Kiszka

block migration: Avoid large stack buffer

Move a potentially large buffer from stack to heap.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

d11ecd3d 12/03/2009 06:48 pm Jan Kiszka

block migration: Avoid indirection of block_mig_state

No need to push block_mig_state to the heap and, thus, establish an
indirection.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

3c095c3f 12/03/2009 06:48 pm Jan Kiszka

block migration: Drop dead code

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

5e5328be 12/03/2009 06:48 pm Jan Kiszka

block migration: Switch device and block lists to QSIMPLEQ

Based on the original patch by Pierre Riteau.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

69d63a97 12/03/2009 06:48 pm Jan Kiszka

block migration: Initialize remaining BlkMigState fields

In case we restart a migration, submitted, read_done, transferred, and
print_completion need to be reinitialized to 0.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

50035d3d 11/17/2009 11:00 pm Blue Swirl

Fix mingw32 build

Signed-off-by: Blue Swirl <>

c163b5ca 11/17/2009 04:49 pm lirans@il.ibm.com

Block live migration

This patch introduces block migration called during live migration. Block
are being copied to the destination in an async way. First the code will
transfer the whole disk and then transfer all dirty blocks accumulted during
the migration....