From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8YyE-0008PQ-2a for qemu-devel@nongnu.org; Fri, 26 Jun 2015 15:07:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8YyA-000462-Jc for qemu-devel@nongnu.org; Fri, 26 Jun 2015 15:07:26 -0400 Received: from e18.ny.us.ibm.com ([129.33.205.208]:47722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8YyA-00045s-Dr for qemu-devel@nongnu.org; Fri, 26 Jun 2015 15:07:22 -0400 Received: from /spool/local by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Jun 2015 15:07:22 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 3563038C8054 for ; Fri, 26 Jun 2015 15:07:19 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t5QJ7JPW63504548 for ; Fri, 26 Jun 2015 19:07:19 GMT Received: from d01av04.pok.ibm.com (localhost [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t5QJ7Irc011499 for ; Fri, 26 Jun 2015 15:07:18 -0400 Message-ID: <558DA2E6.5020504@linux.vnet.ibm.com> Date: Fri, 26 Jun 2015 15:07:18 -0400 From: "Jason J. Herne" MIME-Version: 1.0 References: <1435254377-13322-1-git-send-email-jjherne@linux.vnet.ibm.com> <1435254377-13322-4-git-send-email-jjherne@linux.vnet.ibm.com> <20150626175441.GJ2186@work-vm> In-Reply-To: <20150626175441.GJ2186@work-vm> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 3/5] migration: Dynamic cpu throttling for auto-converge Reply-To: jjherne@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: amit.shah@redhat.com, borntraeger@de.ibm.com, qemu-devel@nongnu.org, afaerber@suse.de, quintela@redhat.com On 06/26/2015 01:54 PM, Dr. David Alan Gilbert wrote: > * Jason J. Herne (jjherne@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 (jjherne@linux.vnet.ibm.com)