From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3LpC-0008NN-Cq for qemu-devel@nongnu.org; Mon, 30 Nov 2015 05:36:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3Lp7-0003JQ-EW for qemu-devel@nongnu.org; Mon, 30 Nov 2015 05:36:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Lp7-0003JI-AD for qemu-devel@nongnu.org; Mon, 30 Nov 2015 05:36:45 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id F1DB314CADC for ; Mon, 30 Nov 2015 10:36:44 +0000 (UTC) References: <20151130034732.GA12255@pxdev.xzpeter.org> <565C12EA.5090801@redhat.com> <20151130094708.GA8728@pxdev.xzpeter.org> From: Paolo Bonzini Message-ID: <565C26B9.3010200@redhat.com> Date: Mon, 30 Nov 2015 11:36:41 +0100 MIME-Version: 1.0 In-Reply-To: <20151130094708.GA8728@pxdev.xzpeter.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] question: about exec/poison.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: qemu-devel@nongnu.org On 30/11/2015 10:47, Peter Xu wrote: > So from what I understand from your reply, I could include the > percentage value into "query-dump", right? :) If you have the written and total bytes in the QMP reply, you can use total*100/written to compute the percentage in the HMP return value. If total and written do not produce the percentage, you need to add another numerator and denominator pair to the QMP reply. > Actually, I think it would be cooler if we could have them in both > QMP/HMP messages (maybe I would better prefer percentage comparing > to written/total bytes, since it is more directly human > readable). For HMP yes. QMP need not be human readable, it only needs to be a good API (which sometimes means being less human readable). Paolo