mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-30 05:21:55 -06:00
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>
This commit is contained in:
parent
1626fee3bd
commit
070afca258
2 changed files with 34 additions and 59 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue