From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaZIP-0004S6-Qa for qemu-devel@nongnu.org; Thu, 09 May 2013 18:26:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaZIO-0004Zu-OS for qemu-devel@nongnu.org; Thu, 09 May 2013 18:26:41 -0400 Received: from g4t0015.houston.hp.com ([15.201.24.18]:34184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaZIO-0004Zp-Is for qemu-devel@nongnu.org; Thu, 09 May 2013 18:26:40 -0400 Message-ID: <518C229D.10206@hp.com> Date: Thu, 09 May 2013 15:26:37 -0700 From: Chegu Vinod MIME-Version: 1.0 References: <1368128600-30721-1-git-send-email-chegu_vinod@hp.com> <1368128600-30721-4-git-send-email-chegu_vinod@hp.com> <20130509220537.3018a727@thinkpad> In-Reply-To: <20130509220537.3018a727@thinkpad> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v5 3/3] Force auto-convegence of live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: quintela@redhat.com, qemu-devel@nongnu.org, owasserm@redhat.com, anthony@codemonkey.ws, pbonzini@redhat.com On 5/9/2013 1:05 PM, Igor Mammedov wrote: > On Thu, 9 May 2013 12:43:20 -0700 > Chegu Vinod 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 > >> + } >> + } >> +}