summaryrefslogtreecommitdiffstats
path: root/block-migration.c
Commit message (Collapse)AuthorAgeFilesLines
* Try not to exceed max downtime on stage3Liran Schour2010-02-091-9/+70
| | | | | | | | 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 <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Tranfer dirty blocks during iterative phaseLiran Schour2010-02-091-36/+99
| | | | | | | | Start transfer dirty blocks during the iterative stage. That will reduce the time that the guest will be suspended Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove unused codeLiran Schour2010-02-091-43/+18
| | | | | | | | | 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 <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Do not use dprintfmalc2010-02-071-5/+5
| | | | | | | | | dprintf is already claimed by POSIX[1], 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 <av1474@comtv.ru>
* block migration: Skip zero-sized disksJan Kiszka2009-12-031-2/+8
| | | | | | | No need to migrate emptiness (risking divide by zero later on). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Add support for restore progress reportingJan Kiszka2009-12-031-8/+22
| | | | | | | | 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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Report progress also via info migrationJan Kiszka2009-12-031-0/+32
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Fix outgoing progress outputJan Kiszka2009-12-031-24/+30
| | | | | | | | Report progress of an outgoing live migration to the monitor instead of stdout. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* live migration: Propagate output monitor to callback handlerJan Kiszka2009-12-031-1/+1
| | | | | | | | | 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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Report overall migration progressJan Kiszka2009-12-031-16/+30
| | | | | | | | | | 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 display on those values. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* live migration: Allow cleanup after cancellation or errorJan Kiszka2009-12-031-6/+30
| | | | | | | | | | 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 now free its device descriptors and pending blocks. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Add error handling/propagationJan Kiszka2009-12-031-16/+41
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Consolidate block transmissionJan Kiszka2009-12-031-65/+39
| | | | | | | | Based on the original patch by Pierre Riteau: Use a common blk_send function to transmit a block. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Consolidate mig_read_device_bulk into mig_save_device_bulkJan Kiszka2009-12-031-99/+50
| | | | | | | Both functions share a lot of code, so make them one. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Clean up use of total_sectorsJan Kiszka2009-12-031-3/+3
| | | | | | | | 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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Initialize remaining BlkMigState fieldsJan Kiszka2009-12-031-0/+5
| | | | | | | | In case we restart a migration, submitted, read_done, transferred, and print_completion need to be reinitialized to 0. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Switch device and block lists to QSIMPLEQJan Kiszka2009-12-031-35/+22
| | | | | | | Based on the original patch by Pierre Riteau. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Drop dead codeJan Kiszka2009-12-031-24/+0
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Avoid indirection of block_mig_stateJan Kiszka2009-12-031-47/+44
| | | | | | | | No need to push block_mig_state to the heap and, thus, establish an indirection. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Avoid large stack bufferJan Kiszka2009-12-031-5/+9
| | | | | | | Move a potentially large buffer from stack to heap. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Rework constants APIJan Kiszka2009-12-031-36/+27
| | | | | | | | | 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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block migration: Fix coding style and whitespacesJan Kiszka2009-12-031-206/+184
| | | | | | | No functional changes. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix mingw32 buildBlue Swirl2009-11-171-1/+0
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Block live migrationlirans@il.ibm.com2009-11-171-0/+558
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. Still need to improve transition from the iterative phase of migration to the end phase. For now transition will take place when all blocks transfered once, all the dirty blocks will be transfered during the end phase (guest is suspended). Changes from v4: - Global variabels moved to a global state structure allocated dynamically. - Minor coding style issues. - Poll block.c for tracking of dirty blocks instead of manage it here. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud