mirror of https://github.com/proxmox/mirror_qemu
migration: do not transfer ram during bulk storage migration
this patch makes the bulk phase of a block migration to take place before we start transferring ram. As the bulk block migration can take a long time its pointless to transfer ram during that phase. Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <1520507908-16743-2-git-send-email-pl@kamp.de> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>master
parent
ab105cc138
commit
b255734531
|
@ -2258,6 +2258,13 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
|
||||||
int64_t t0;
|
int64_t t0;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
|
|
||||||
|
if (blk_mig_bulk_active()) {
|
||||||
|
/* Avoid transferring ram during bulk phase of block migration as
|
||||||
|
* the bulk phase will usually take a long time and transferring
|
||||||
|
* ram updates during that time is pointless. */
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
if (ram_list.version != rs->last_version) {
|
if (ram_list.version != rs->last_version) {
|
||||||
ram_state_reset(rs);
|
ram_state_reset(rs);
|
||||||
|
@ -2304,6 +2311,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
|
||||||
*/
|
*/
|
||||||
ram_control_after_iterate(f, RAM_CONTROL_ROUND);
|
ram_control_after_iterate(f, RAM_CONTROL_ROUND);
|
||||||
|
|
||||||
|
out:
|
||||||
qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
|
qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
|
||||||
ram_counters.transferred += 8;
|
ram_counters.transferred += 8;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue