diff options
author | Jason J. Herne <jjherne@linux.vnet.ibm.com> | 2015-09-08 13:12:35 -0400 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2015-09-30 09:42:04 +0200 |
commit | 070afca258f973c704dcadf2769aa1ca921209a1 (patch) | |
tree | 5e65b87dac7f7348fe2e20241fa217290281f960 /migration/migration.c | |
parent | 1626fee3bdbb295d5e8aff800f7621357bb376d6 (diff) |
migration: Dynamic cpu throttling for auto-converge
Remove traditional auto-converge static 30ms throttling code and replace it
with a dynamic throttling algorithm.
Additionally, be more aggressive when deciding when to start throttling.
Previously we waited until four unproductive memory passes. Now we begin
throttling after only two unproductive memory passes. Four seemed quite
arbitrary and only waiting for two passes allows us to complete the migration
faster.
Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c index 8a1af3b123..e8292319ae 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -29,6 +29,7 @@ #include "trace.h" #include "qapi/util.h" #include "qapi-event.h" +#include "qom/cpu.h" #define MAX_THROTTLE (32 << 20) /* Migration speed throttling */ @@ -1070,6 +1071,9 @@ static void *migration_thread(void *opaque) } } + /* If we enabled cpu throttling for auto-converge, turn it off. */ + cpu_throttle_stop(); + qemu_mutex_lock_iothread(); if (s->state == MIGRATION_STATUS_COMPLETED) { int64_t end_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); |