qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] nvdimm: disable balloon


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/2] nvdimm: disable balloon
Date: Wed, 27 Jan 2016 13:52:52 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 01/27/2016 06:24 AM, Denis V. Lunev wrote:
> From: Vladimir Sementsov-Ogievskiy <address@hidden>
> 
> NVDIMM for now is planned to use as a backing store for DAX filesystem
> in the guest and thus this memory is excluded from guest memory
> management
> and LRUs.

Intentional mid-line break?

> 
> In this case libvirt running QEMU along with configured balloon almost
> immediately inflates balloon and effectively kill the guest as
> qemu counts nvdimm as part of the ram.
> 
> Counting dimm devices as part of the ram for ballooning was started from
> commit 463756d03:
>  virtio-balloon: Fix balloon not working correctly when hotplug memory
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Stefan Hajnoczi <address@hidden>
> CC: Xiao Guangrong <address@hidden>
> CC: "Michael S. Tsirkin" <address@hidden>
> CC: Igor Mammedov <address@hidden>
> CC: Eric Blake <address@hidden>
> CC: Markus Armbruster <address@hidden>
> ---
>  hw/mem/pc-dimm.c           | 2 ++
>  hw/virtio/virtio-balloon.c | 4 +++-
>  qapi-schema.json           | 5 ++++-
>  3 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
> index 4f30950..2ff9f95 100644
> --- a/hw/mem/pc-dimm.c
> +++ b/hw/mem/pc-dimm.c
> @@ -19,6 +19,7 @@
>   */
>  
>  #include "hw/mem/pc-dimm.h"
> +#include "hw/mem/nvdimm.h"
>  #include "qemu/config-file.h"
>  #include "qapi/visitor.h"
>  #include "qemu/range.h"
> @@ -178,6 +179,7 @@ int qmp_pc_dimm_device_list(Object *obj, void *opaque)
>              di->size = object_property_get_int(OBJECT(dimm), 
> PC_DIMM_SIZE_PROP,
>                                                 NULL);
>              di->memdev = object_get_canonical_path(OBJECT(dimm->hostmem));
> +            di->balloonable = (object_dynamic_cast(obj, TYPE_NVDIMM) == 
> NULL);

The outer () seem spurious to me; I might have shortened this to:

di->balloonable = !object_dynamic_cast(obj, TYPE_NVDIMM);


> +++ b/qapi-schema.json
> @@ -3924,6 +3924,8 @@
>  #
>  # @hotpluggable: true if device if could be added/removed while machine is 
> running
>  #
> +# @balloonable: true if device take part in ballooning (since 2.6)

s/take/takes/

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