From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0Cjp-0003nR-7r for qemu-devel@nongnu.org; Wed, 03 Jun 2015 13:46:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0Cji-0005as-Em for qemu-devel@nongnu.org; Wed, 03 Jun 2015 13:46:01 -0400 Received: from e18.ny.us.ibm.com ([129.33.205.208]:56853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0Cjh-0005ab-Qb for qemu-devel@nongnu.org; Wed, 03 Jun 2015 13:45:54 -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 ; Wed, 3 Jun 2015 13:45:53 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 865306E803C for ; Wed, 3 Jun 2015 13:37:37 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t53Hjo9G54788202 for ; Wed, 3 Jun 2015 17:45:50 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 t53HjmQ3012943 for ; Wed, 3 Jun 2015 13:45:49 -0400 Message-ID: <556F3D49.4000405@linux.vnet.ibm.com> Date: Wed, 03 Jun 2015 13:45:45 -0400 From: "Jason J. Herne" MIME-Version: 1.0 References: <1433267209-9882-1-git-send-email-jjherne@linux.vnet.ibm.com> <1433267209-9882-4-git-send-email-jjherne@linux.vnet.ibm.com> <556E0DFA.5070601@redhat.com> In-Reply-To: <556E0DFA.5070601@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 3/3] qmp/hmp: Add throttle ratio to query-migrate and info migrate Reply-To: jjherne@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , afaerber@suse.de, amit.shah@redhat.com, dgilbert@redhat.com, borntraeger@de.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org On 06/02/2015 04:11 PM, Eric Blake wrote: > On 06/02/2015 11:46 AM, Jason J. Herne wrote: >> Report throttle ratio in info migrate and query-migrate responses when cpu >> throttling is active. >> >> Signed-off-by: Jason J. Herne >> --- >> hmp.c | 5 +++++ >> migration/migration.c | 5 +++++ >> qapi-schema.json | 3 ++- >> 3 files changed, 12 insertions(+), 1 deletion(-) >> >> diff --git a/hmp.c b/hmp.c >> index e17852d..cb3c137 100644 >> --- a/hmp.c >> +++ b/hmp.c >> @@ -229,6 +229,11 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict) >> info->xbzrle_cache->overflow); >> } >> >> + if (info->has_x_cpu_throttle_ratio) { >> + monitor_printf(mon, "cpu throttle ratio : %0.2f\n", > > s/ :/:/ > Will fix, Thanks. > How big or small can the ratio get? Is %g going to be nicer than %f if > the ratio goes through a large range of possibilities? > You are correct in your interpretation below. So a ratio of 10.0 would be 90.9% throttled. A ratio of 100 would be 99% throttled. Given that, I think we're ok with %f. >> +++ b/qapi-schema.json >> @@ -483,7 +483,8 @@ >> '*total-time': 'int', >> '*expected-downtime': 'int', >> '*downtime': 'int', >> - '*setup-time': 'int'} } >> + '*setup-time': 'int', >> + '*x-cpu-throttle-ratio': 'number'} } > > Even though it is marked experimental, it is still worth documenting > this parameter, and include mention of how to interpret it (0.0 means no > throttling, 1.0 means 50% duty cycle, 2.0 means 33% duty cycle, right?). > Documentation should mention '(since 2.4)' > Will fix. -- -- Jason J. Herne (jjherne@linux.vnet.ibm.com)