From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOX5G-0002ah-SH for qemu-devel@nongnu.org; Wed, 27 Jan 2016 15:52:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOX5C-00029x-NU for qemu-devel@nongnu.org; Wed, 27 Jan 2016 15:52:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOX5C-00029t-F2 for qemu-devel@nongnu.org; Wed, 27 Jan 2016 15:52:54 -0500 References: <1453901069-18091-1-git-send-email-den@openvz.org> <1453901069-18091-3-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <56A92E24.7040208@redhat.com> Date: Wed, 27 Jan 2016 13:52:52 -0700 MIME-Version: 1.0 In-Reply-To: <1453901069-18091-3-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xQ9aITNOInBLTN4PqtsdjP6rPG0ol6x3C" Subject: Re: [Qemu-devel] [PATCH 2/2] nvdimm: disable balloon List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Vladimir Sementsov-Ogievskiy , Xiao Guangrong , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi , Igor Mammedov This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xQ9aITNOInBLTN4PqtsdjP6rPG0ol6x3C Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/27/2016 06:24 AM, Denis V. Lunev wrote: > From: Vladimir Sementsov-Ogievskiy >=20 > 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? >=20 > 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. >=20 > Counting dimm devices as part of the ram for ballooning was started fro= m > commit 463756d03: > virtio-balloon: Fix balloon not working correctly when hotplug memory >=20 > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > CC: Xiao Guangrong > CC: "Michael S. Tsirkin" > CC: Igor Mammedov > CC: Eric Blake > CC: Markus Armbruster > --- > hw/mem/pc-dimm.c | 2 ++ > hw/virtio/virtio-balloon.c | 4 +++- > qapi-schema.json | 5 ++++- > 3 files changed, 9 insertions(+), 2 deletions(-) >=20 > 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 @@ > */ > =20 > #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 *opaq= ue) > di->size =3D object_property_get_int(OBJECT(dimm), PC_DIMM= _SIZE_PROP, > NULL); > di->memdev =3D object_get_canonical_path(OBJECT(dimm->host= mem)); > + di->balloonable =3D (object_dynamic_cast(obj, TYPE_NVDIMM)= =3D=3D NULL); The outer () seem spurious to me; I might have shortened this to: di->balloonable =3D !object_dynamic_cast(obj, TYPE_NVDIMM); > +++ b/qapi-schema.json > @@ -3924,6 +3924,8 @@ > # > # @hotpluggable: true if device if could be added/removed while machin= e is running > # > +# @balloonable: true if device take part in ballooning (since 2.6) s/take/takes/ --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --xQ9aITNOInBLTN4PqtsdjP6rPG0ol6x3C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWqS4kAAoJEKeha0olJ0Nq6tEH/0WBC8wN94Hzdao9rSgyNcPJ eHTbtbU3+eLYyCOFGzX2vFPzGa934jfnKxhVxbVfQCefOzw8SNWq1TuyCphaFrmB xzufoE/tvzXP07s/ZHpnjR9OAbURur3w81rzFNHOGAy9dMOaCh9g3cwvUqRhXMB6 glQPhwT8OmZn3cq3tapDAxkFwDlUsAHao1nNfJWHgjwgqm92qjj2UaY6eHvPdOCb 71zNzbCEHnRKIwq8f3o3pVZtNGmvIwIlxmo5wEi9U4tGAI++Ypxc5/QJejadI56k XqcOSxwpIl3x5vhBLSroMv8fZo3gKyBDXYj2aYLBN8M3GpojszDi0HnoDDN4AII= =N58f -----END PGP SIGNATURE----- --xQ9aITNOInBLTN4PqtsdjP6rPG0ol6x3C--