qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v4 19/30] Implement "info memory-total" and


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH v4 19/30] Implement "info memory-total" and "query-memory-total"
Date: Fri, 04 Jan 2013 09:21:08 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/18/2012 05:41 AM, Vasilis Liaskovitis wrote:
> Returns total physical memory available to guest in bytes, including 
> hotplugged
> memory. Note that the number reported here may be different from what the 
> guest
> sees e.g. if the guest has not logically onlined hotplugged memory.
> 
> This functionality is provided independently of a balloon device, since a
> guest can be using ACPI memory hotplug without using a balloon device.
> 
> v3->v4: Moved qmp command implementation to vl.c. This prevents a circular
> header dependency problem.

Generally, patch change history should occur...

> 
> Signed-off-by: Vasilis Liaskovitis <address@hidden>
> ---

...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' }
>  
>  ##
> +# @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' }

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]