]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Use unlimited speed when migrating to file
authorJiri Denemark <jdenemar@redhat.com>
Tue, 20 Mar 2012 15:56:29 +0000 (16:56 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 21 Mar 2012 16:26:20 +0000 (17:26 +0100)
commit9f71368d06234e76428b7028ed7becea14ebb831
tree23fd98f55499d96e20e042a85d5f46e6fcc918f5
parent53b45aa494a94854862603f5694d137f928edfdd
qemu: Use unlimited speed when migrating to file

This reverts commit 61f2b6ba5fdef0613d6351b99913b5ef468144ce and most of
commit d8916dc8e2f612ab3ce46f32c4bfeb0bd73f6007, which effectively
brings back commit ef1065cf5acad13767c054758cbe7f4e8af5d241 written by
Jim Fehlig:

The qemu migration speed default is 32MiB/s as defined in migration.c

/* Migration speed throttling */
static int64_t max_throttle = (32 << 20);

There's no need to throttle migration when targeting a file, so set
migration speed to unlimited prior to migration, and restore to libvirt
default value after migration.

Default units is MB for migrate_set_speed monitor command, so
(INT64_MAX / (1024 * 1024)) is used for unlimited migration speed.

This was reverted because migration to file could not be canceled and
even monitored since qemu was not processing any monitor commands until
the migration finished. This is now different as we make sure the
file descriptor we pass to qemu is able to properly report EAGAIN.
Recent qemu changes might have helped as well.

I tested managedsave with this patch in and indeed, it is 10x faster
while I can still monitor its progress.
src/qemu/qemu_domain.h
src/qemu/qemu_migration.c