From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQjCS-0003PM-7L for qemu-devel@nongnu.org; Tue, 02 Feb 2016 17:13:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQjCR-0004jb-3j for qemu-devel@nongnu.org; Tue, 02 Feb 2016 17:13:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQjCQ-0004jW-S9 for qemu-devel@nongnu.org; Tue, 02 Feb 2016 17:13:27 -0500 References: <1453963872-13549-1-git-send-email-vsementsov@virtuozzo.com> <1453963872-13549-4-git-send-email-vsementsov@virtuozzo.com> From: Eric Blake Message-ID: <56B12A05.4060305@redhat.com> Date: Tue, 2 Feb 2016 15:13:25 -0700 MIME-Version: 1.0 In-Reply-To: <1453963872-13549-4-git-send-email-vsementsov@virtuozzo.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MMV2LRu9gH6qPNsbERr3Nbj71JVQM521d" Subject: Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org Cc: Xiao Guangrong , "Michael S. Tsirkin" , Markus Armbruster , Stefan Hajnoczi , Igor Mammedov , "Denis V. Lunev" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MMV2LRu9gH6qPNsbERr3Nbj71JVQM521d Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/27/2016 11:51 PM, Vladimir Sementsov-Ogievskiy wrote: > 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. >=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 > --- > @@ -308,7 +309,9 @@ static ram_addr_t get_current_ram_size(void) > if (value) { > switch (value->type) { > case MEMORY_DEVICE_INFO_KIND_DIMM: > - size +=3D value->u.dimm->size; > + if (strcmp(value->u.dimm->type, TYPE_NVDIMM)) { If you fix 2/3 to use a QAPI enum, then this will be an integer compare instead of a strcmp(). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --MMV2LRu9gH6qPNsbERr3Nbj71JVQM521d 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/ iQEcBAEBCAAGBQJWsSoFAAoJEKeha0olJ0NqITwH/3wvq6miDCywIcNHr/CwS8Ij A9JjJikANxrVtI3pEC9LO8nvugIdjFXiyMfOcBwD9GfZ9N7E/rybELyN2A4hIM7i qUzPSzlwirsKpGhRjiek7eQDW1IwTebZ89VTs/DldG/pKHqxQ9rLu+yaQSDWDgx+ QeefCmdkv/RSJJ/YmL3/xqzuHTKOJIJ9lRHU8shP9a6YGDu5d+ym7alzQifXx7l+ mJ9BQhVCgNGcfMz2sFolSVL7Vhahj/dEwaggN3OP0KdbLxEsCnkhsVbQ5EXYFZrX kzh8mWqq8bIfvlTctl8PpmXn9SuZGXXJk1YG/aitORUcCcjA2cbHGtHkXNc9QFU= =bjTG -----END PGP SIGNATURE----- --MMV2LRu9gH6qPNsbERr3Nbj71JVQM521d--