On 06/26/2015 01:54 PM, Dr. David Alan Gilbert wrote:
* Jason J. Herne (jjhe...@linux.vnet.ibm.com) wrote:
...
diff --git a/migration/migration.c b/migration/migration.c
index 05790e9..7708c54 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -25,6 +25,7 @@
  #include "qemu/thread.h"
  #include "qmp-commands.h"
  #include "trace.h"
+#include "qom/cpu.h"

  #define MAX_THROTTLE  (32 << 20)      /* Migration speed throttling */

@@ -858,6 +859,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);

Is that cpu_throttle_stop() sufficient if I use 'migration cancel'
so that next time through it's all reset so that there's no throttling
at the beginning?


It will be reset when cpu_throttle_set is called again when auto-converge
re-enables throttling for the next migration. This happens in patch 3,
mig_throttle_guest_down():

Basically, cpu_throttle_set requires the user to provide a throttling
percentage. So starting a new throttling operation will overwrite the
previous value.

--
-- Jason J. Herne (jjhe...@linux.vnet.ibm.com)


Reply via email to