From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrA1R-0001X8-F5 for qemu-devel@nongnu.org; Fri, 04 Jan 2013 11:21:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TrA1J-00013S-S2 for qemu-devel@nongnu.org; Fri, 04 Jan 2013 11:21:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrA1J-000124-KO for qemu-devel@nongnu.org; Fri, 04 Jan 2013 11:21:21 -0500 Message-ID: <50E70174.6000400@redhat.com> Date: Fri, 04 Jan 2013 09:21:08 -0700 From: Eric Blake MIME-Version: 1.0 References: <1355834518-17989-1-git-send-email-vasilis.liaskovitis@profitbricks.com> <1355834518-17989-20-git-send-email-vasilis.liaskovitis@profitbricks.com> In-Reply-To: <1355834518-17989-20-git-send-email-vasilis.liaskovitis@profitbricks.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigC2160762659573FED80E1B49" Subject: Re: [Qemu-devel] [RFC PATCH v4 19/30] Implement "info memory-total" and "query-memory-total" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vasilis Liaskovitis Cc: pingfank@linux.vnet.ibm.com, gleb@redhat.com, stefanha@gmail.com, jbaron@redhat.com, seabios@seabios.org, qemu-devel@nongnu.org, blauwirbel@gmail.com, kevin@koconnor.net, kraxel@redhat.com, anthony@codemonkey.ws This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC2160762659573FED80E1B49 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/18/2012 05:41 AM, Vasilis Liaskovitis wrote: > Returns total physical memory available to guest in bytes, including ho= tplugged > memory. Note that the number reported here may be different from what t= he guest > sees e.g. if the guest has not logically onlined hotplugged memory. >=20 > This functionality is provided independently of a balloon device, since= a > guest can be using ACPI memory hotplug without using a balloon device. >=20 > v3->v4: Moved qmp command implementation to vl.c. This prevents a circu= lar > header dependency problem. Generally, patch change history should occur... >=20 > Signed-off-by: Vasilis Liaskovitis > --- =2E..here, after the --- divider. It's useful in the email chain, but does not need to be part of the final git history. > +++ b/qapi-schema.json > @@ -2903,6 +2903,17 @@ > { 'command': 'query-target', 'returns': 'TargetInfo' } > =20 > ## > +# @query-memory-total: > +# > +# Returns total memory in bytes, including hotplugged dimms > +# > +# Returns: int > +# > +# Since: 1.4 > +## > +{ 'command': 'query-memory-total', 'returns': 'int' } Any reason you can't name this just 'query-memory', and return a JSON dictionary instead of a single int, so that in the future you can add other memory parameters into the same call? For example, down the road we may want to report some 'newstat' without adding a new QMP command: { 'type': 'MemoryInfo', 'data': { 'total': 'int', 'newstat': 'int' } } { 'command': 'query-memory', 'returns': 'MemoryInfo' } --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigC2160762659573FED80E1B49 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBCAAGBQJQ5wF0AAoJEKeha0olJ0NqzKoIAI7J4CnNSASlaHjQcP+UqOwR UWtOqifPpZTE1v875LRVf471v9KFEeoErKctPmNJbAUHpk5FOF25WxH7adjMx2kU AhObDwXv0c0fyZyyL9IthV6NC1UWWRT1knWQuJnaJFiRrLyfCmW3+gLsxUebLV1u uKdBogRpk5O0n4mUfS4KialqPh9q60AV9r6aopliERYIKDG3lu7jqTCUS0KI4LAt Fn4WMVIRFFAS9VIE08RkRgxlVbcO4VNwu9w3NBsAaDowHFH3oAUdSoRkz7oKPRei Dms3LKMazVMXhoRkpcOlsHo6Gh+7P9qV71FTEcTmk58vzfPIGu6mCItXeLKNoYk= =QZcA -----END PGP SIGNATURE----- --------------enigC2160762659573FED80E1B49--