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. > > 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 <vsement...@virtuozzo.com> > Signed-off-by: Denis V. Lunev <d...@openvz.org> > CC: Stefan Hajnoczi <stefa...@redhat.com> > CC: Xiao Guangrong <guangrong.x...@linux.intel.com> > CC: "Michael S. Tsirkin" <m...@redhat.com> > CC: Igor Mammedov <imamm...@redhat.com> > CC: Eric Blake <ebl...@redhat.com> > CC: Markus Armbruster <arm...@redhat.com> > ---
> @@ -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 += 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().
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
