qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Cc: imammedo@redhat.com, peter.huangpeng@huawei.com,
	zhanghailiang <zhang.zhanghailiang@huawei.com>,
	qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <546CBCB3.9040606@redhat.com> (raw)
In-Reply-To: <20141119101336.5893db6c@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]

On 11/19/2014 08:13 AM, Luiz Capitulino wrote:
> On Wed, 19 Nov 2014 12:32:46 +0200
> "Michael S. Tsirkin" <mst@redhat.com> 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 <zhang.zhanghailiang@huawei.com>
>>
>>
>> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  reply	other threads:[~2014-11-19 15:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17  5:11 [Qemu-devel] [PATCH v2 0/3] fix bug about balloon working incorrectly when hotplug memeory zhanghailiang
2014-11-17  5:11 ` [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size zhanghailiang
2014-11-19  9:59   ` Igor Mammedov
2014-11-19 10:32   ` Michael S. Tsirkin
2014-11-19 15:13     ` Luiz Capitulino
2014-11-19 15:52       ` Eric Blake [this message]
2014-11-19 16:06         ` Michael S. Tsirkin
2014-11-19 16:31           ` Eric Blake
2014-11-20  2:31             ` zhanghailiang
2014-11-20  9:10             ` Michael S. Tsirkin
2014-11-20  2:33     ` zhanghailiang
2014-11-17  5:11 ` [Qemu-devel] [PATCH v2 2/3] virtio-balloon: Fix balloon not working correctly when hotplug memory zhanghailiang
2014-11-17  5:11 ` [Qemu-devel] [PATCH v2 3/3] virtio-balloon: Add some trace events zhanghailiang
2014-11-17  6:07 ` [Qemu-devel] [PATCH v2 0/3] fix bug about balloon working incorrectly when hotplug memeory Michael S. Tsirkin
2014-11-17 10:39 ` Michael S. Tsirkin
2014-11-17 10:53   ` zhanghailiang
2014-11-17 12:25     ` zhanghailiang
2014-11-17 12:40       ` Michael S. Tsirkin
2014-11-18  2:50         ` zhanghailiang
2014-11-19  8:28 ` zhanghailiang
2014-11-19 10:06   ` Igor Mammedov
2015-03-03 14:04 ` Luiz Capitulino
2015-03-04 12:55   ` zhanghailiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=546CBCB3.9040606@redhat.com \
    --to=eblake@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).