From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Lxh-0003bw-9F for qemu-devel@nongnu.org; Mon, 30 Nov 2015 05:45:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3Lxc-0005F6-6i for qemu-devel@nongnu.org; Mon, 30 Nov 2015 05:45:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Lxb-0005Ew-V5 for qemu-devel@nongnu.org; Mon, 30 Nov 2015 05:45:32 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 8526996C5 for ; Mon, 30 Nov 2015 10:45:31 +0000 (UTC) Date: Mon, 30 Nov 2015 18:45:22 +0800 From: Peter Xu Message-ID: <20151130104520.GC8728@pxdev.xzpeter.org> References: <20151130034732.GA12255@pxdev.xzpeter.org> <565C12EA.5090801@redhat.com> <20151130094708.GA8728@pxdev.xzpeter.org> <565C26B9.3010200@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <565C26B9.3010200@redhat.com> Subject: Re: [Qemu-devel] question: about exec/poison.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Mon, Nov 30, 2015 at 11:36:41AM +0100, Paolo Bonzini wrote: > > > 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. Then I will use written/total numbers in 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). Ok. Thanks. Peter > > Paolo