[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v5 3/3] Force auto-convegence of live migrat
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [RFC PATCH v5 3/3] Force auto-convegence of live migration |
Date: |
Thu, 9 May 2013 22:05:37 +0200 |
On Thu, 9 May 2013 12:43:20 -0700
Chegu Vinod <address@hidden> 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()?
> + }
> + }
> +}
--
Regards,
Igor