History | View | Annotate | Download (3.2 kB)
Add xbzrle_encode_buffer and xbzrle_decode_buffer functions
For performance we are encoding long word at a time.For nzrun we use long-word-at-a-time NULL-detection tricks from strcmp():using ((lword - 0x0101010101010101) & (~lword) & 0x8080808080808080) test...
Add XBZRLE to ram_save_block and ram_save_live
In the outgoing migration check to see if the page is cached andchanged, then send compressed page by using save_xbrle_page function.In the incoming migration check to see if RAM_SAVE_FLAG_XBZRLE is setand decompress the page (by using load_xbrle function)....
Add migrate_set_cache_size command
Change XBZRLE cache size in bytes (the size should be a power of 2, it will berounded down to the nearest power of 2).If XBZRLE cache size is too small there will be many cache miss.
New query-migrate-cache-size QMP command and 'info migrate_cache_size' HMP...
Add migration accounting for normal and duplicate pages
Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com>Signed-off-by: Petter Svard <petters@cs.umu.se>Signed-off-by: Aidan Shribman <aidan.shribman@sap.com>Signed-off-by: Orit Wasserman <owasserm@redhat.com>...
Add XBZRLE statistics
Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com>Signed-off-by: Petter Svard <petters@cs.umu.se>Signed-off-by: Aidan Shribman <aidan.shribman@sap.com>Signed-off-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>...
Add migration capabilities
The management can query the current migration capabilities usingquery-migrate-capabilities QMP command.The user can use 'info migrate_capabilities' HMP command.Currently only XBZRLE capability is available.
Signed-off-by: Orit Wasserman <owasserm@redhat.com>...
savevm: Live migration handlers register the struct directly
Notice that the live migration users never unregister, so no problemabout freeing the ops structure.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Add spent time for migration
We add time spent for migration to the output of "info migrate" command. 'total_time' means time since the start fo migration ifmigration is 'active', and total time of migration if migration iscompleted. As we are also interested in transferred ram when...
Add MigrationParams structure
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
use inet_listen()/inet_connect() to support ipv6 migration
Use help functions in qemu-socket.c for tcp migration,which already support ipv6 addresses.
Currently errp will be set to UNDEFINED_ERROR when migration fails,qemu would output "migration failed: ...", and current user can...
Purge migration of (almost) everything to do with monitors
The Monitor object is passed back and forth within the migration/savevmcode so that it can print errors and progress to the user.
However, that approach assumes a HMP monitor, being completely invalid...
qapi: Convert migrate
The migrate command is one of those commands where HMP and QMP completelymix up together. This made the conversion to the QAPI (which separates thecommand into QMP and HMP parts) a bit difficult.
The first important change to be noticed is that this commit completes the...
Merge remote-tracking branch 'stefanha/trivial-patches-next' into staging
migration.h: remove incoming_expected declarations
The variable is deleted by 1bcef683bf840a928d633755031ac572d5fdb851So remove its declaration.
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qapi: Convert migrate_cancel
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert migrate_set_downtime
qapi: Convert migrate_set_speed
migrate: add migration blockers
This lets different subsystems register an Error that is thrown whenevermigration is attempted. This works nicely because it gracefully supportsthings like hotplug.
Right now, if multiple errors are registered, only one of them is reported....
migration: add status query functions
Add migration_is_active and migration_has_failed functionsto query migration state.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
migration: Remove get_status() accessor
It is only used inside migration.c, and fields on that struct areaccessed all around the place on that file.
migration: Remove migration cancel() callback
It is used only in one place
migration: Export a function that tells if the migration has finished correctly
This will allow us to hide the state values.
migration: Make state definitions local
migration: Fold MigrationState into FdMigrationState
Signed-off-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
migration: Rename FdMigrationState MigrationState
migration: Refactor MigrationState creation
migration: Make all posible migration functions static
I have to move two functions postions to avoid forward declarations
migration: move migrate_new to do_migrate
Once there, remove all parameters that don't need to be passed to*start_outgoing_migration() functions
migration: Introduce MIG_STATE_SETUP
Use MIG_STATE_ACTIVE only when migration has really started. Use thisnew state to setup migration parameters. Change defines for ananonymous struct.
migration: Our release callback was just free
We called it from a single place, and always with state !=MIG_STATE_ACTIVE. Just remove the whole callback. For users of thenotifier, notice that this is exactly the case where they don't care,we are just freeing the state from previous failed migration (it can't...
migration: Make *start_outgoing_migration return FdMigrationState
migration: Use FdMigrationState instead of MigrationState when possible
migration: move some declarations to migration.h
Move a few migration related declarations to migration.h.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
add migration state change notifiers
This patch adds functions to register and unregister notifiers formigration state changes and a function to query the migration state.The notifier is called on every state change. Once after establishing anew migration object (which is in active state then) and once when the...
Exit if incoming migration fails
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Factorize common migration incoming code
migration: respect exit status with exec:
This patch makes sure that if the exec: process exits with a non-zero returnstatus, we treat the migration as failed.
This fixes https://bugs.launchpad.net/qemu/+bug/391879
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Monitor: Convert do_migrate() to cmd_new_ret()
While there I'm also dropping a unneeded else clause (the lastone in the function).
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Monitor: Convert simple handlers to cmd_new_ret()
The following handlers always succeed and hence can be convertedto cmd_new_ret() in the same commit.
- do_stop()- do_quit()- do_system_reset()- do_system_powerdown()- do_migrate_cancel()- do_qmp_capabilities()...
monitor: convert do_migrate_set_speed() to QObject
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: convert do_migrate_set_downtime() to QObject
Revert "monitor: Convert do_migrate_set_speed() to QObject"
This reverts commit 3a4921047d514c336531c304bec362c4d138ebcc.
From Luiz:
do_migrate_set_speed() accepts a suffix for the 'value' argument and this is not good for QMP. We will have to add a new argument type to handle that and...
migration: Convert do_info_migrate() to QObject
Return a QDict, which may contain up to more two QDicts, dependingon the type of migration we're performing.
IMPORTANT: as a QInt stores a int64_t integer, RAM values are goingto be stored as int64_t and not as uint64_t as they are today. If...
live migration: Propagate output monitor to callback handler
In order to allow proper progress reporting to the monitor thatinitiated the migration, forward the monitor reference through themigration layer down to SaveLiveStateHandler.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Block live migration
This patch introduces block migration called during live migration. Blockare being copied to the destination in an async way. First the code willtransfer the whole disk and then transfer all dirty blocks accumulted duringthe migration....
monitor: Convert do_migrate() to QObject
Error is still directly printed, as we are only convertingregular output.
monitor: Convert do_migrate_set_speed() to QObject
monitor: Convert do_migrate_cancel() to QObject
monitor: Port handler_1 to use QDict
This commit ports command handlers that receive one argument to usethe new monitor's dictionary.
monitor: Port handler_2 to use QDict
This commit ports command handlers that receive two arguments to usethe new monitor's dictionary.
monitor: Port handler_0 to use QDict
This commit ports command handlers that receive no arguments to usethe new monitor's dictionary.
It might seem no sense to do this, as the handlers have no arguments,but at the end of this porting work all handlers will have the same...
add file descriptor migration
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Cc: Chris Lalancette <clalance@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Migration via unix sockets.
Implement migration via unix sockets. While you can fake this usingexec and netcat, this involves forking another process and isgenerally not very nice. By doing this directly in qemu, we can avoidthe copy through the external nc command. This is useful for...
set migration max downtime
provide a monitor command to allow one to set the maximumdowntime he is willing to suffer during migration, in seconds."ms", "us", "ns" and "s" are accepted as modifiers.
This parameter will be used by ram_save_live() code to determine...
add non-arbitrary migration stop condition
Currently, we're entering migration's stage 3 whena treshold of 10 pages remain to be transferred in the system.
This has hurt some users. However, any proposed threshold isarbitrary by nature, and would only shift the annoyance....
monitor: Decouple terminals (Jan Kiszka)
Currently all registered (and activate) monitor terminals work inbroadcast mode: Everyone sees what someone else types on some otherterminal and what the monitor reports back. This model is broken whenyou have a management monitor terminal that is automatically operated...
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
Remove unnecessary trailing newlines
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162
Reintroduce migrate-to-exec: support (Charles Duffy)
KVM's live migration support included support for exec: URLs, allowing systemstate to be written or received via an arbitrary popen()ed subprocess. Thisprovides a convenient way to pipe state through a compression algorithm or an...
Introduce TCP live migration protocol
This patch introduces a tcp protocol for live migration. It can be used asfollows:
qemu-system-x86_64 -hda ~/images/linux-test.img -monitor stdio <vm runs for a while>(qemu) migrate tcp:localhost:1025
On the same system:...
Introduce UI for live migration
This patch introduces a command line parameter and monitor command for startinga live migration. The next patch will provide an example of how to use theseparameters.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...