qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM'


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size
Date: Wed, 19 Nov 2014 08:52:19 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/19/2014 08:13 AM, Luiz Capitulino wrote:
> On Wed, 19 Nov 2014 12:32:46 +0200
> "Michael S. Tsirkin" <address@hidden> wrote:
> 
>> On Mon, Nov 17, 2014 at 01:11:08PM +0800, zhanghailiang wrote:
>>> The global parameter 'ram_size' does not take into account
>>> the hotplugged memory.
>>>
>>> In some codes, we use 'ram_size' as current VM's real RAM size,
>>> which is not correct.
>>>
>>> Add function 'get_current_ram_size' to calculate VM's current RAM size,
>>> it will enumerate present memory devices and also plus ram_size.
>>>
>>> Signed-off-by: zhanghailiang <address@hidden>
>>
>>
>> This affects QMP right?
> 
> I think later patches will tell how. CC'ing Eric.

As far as I can tell, this is just correcting a reporting issue; the
existing QMP commands/events for tracking balloon size will now properly
account for hotplugged memory.

What I don't know is if this change in semantics will affect any users.
 Libvirt is not yet supporting memory hotplug, so ideally, fixing this
bug before libvirt uses memory hotplug means libvirt will never have to
worry about qemu versions that do incorrect reporting.

The alternative is to declare that the existing QMP commands cannot
change in semantics for the existing members that it reports, and must
instead report additional dictionary members describing the amount of
hot-plugged memory, and then require that the client add the numbers
together itself.  That sounds mean to the client, so I'm hoping we don't
have to go there.

-- 
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]