On 5/9/2013 1:05 PM, Igor Mammedov wrote:
On Thu,  9 May 2013 12:43:20 -0700
Chegu Vinod <chegu_vi...@hp.com> wrote:

  If a user chooses to turn on the auto-converge migration capability
  these changes detect the lack of convergence and throttle down the
  guest. i.e. force the VCPUs out of the guest for some duration
  and let the migration thread catchup and help converge.

[...]
+void migration_throttle_down(void)
+{
+    if (throttling_needed()) {
+        CPUArchState *penv = first_cpu;
+        while (penv) {
+            qemu_mutex_lock_iothread();
+            async_run_on_cpu(ENV_GET_CPU(penv), mig_kick_cpu, NULL);
+            qemu_mutex_unlock_iothread();
+            penv = penv->next_cpu;
could you replace open coded loop with qemu_for_each_cpu()?

Yes will try to replace it in the next version.
Vinod

+        }
+    }
+}


Reply via email to