From: Igor Mammedov <imammedo@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
Xiao Guangrong <guangrong.xiao@linux.intel.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
"Denis V. Lunev" <den@openvz.org>
Subject: Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning
Date: Wed, 3 Feb 2016 17:23:17 +0100 [thread overview]
Message-ID: <20160203172317.1c53b88b@nial.brq.redhat.com> (raw)
In-Reply-To: <87vb65n6le.fsf@blackfin.pond.sub.org>
On Wed, 03 Feb 2016 16:42:21 +0100
Markus Armbruster <armbru@redhat.com> wrote:
> Eric Blake <eblake@redhat.com> writes:
>
> > 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 <vsementsov@virtuozzo.com>
> >> Signed-off-by: Denis V. Lunev <den@openvz.org>
> >> CC: Stefan Hajnoczi <stefanha@redhat.com>
> >> CC: Xiao Guangrong <guangrong.xiao@linux.intel.com>
> >> CC: "Michael S. Tsirkin" <mst@redhat.com>
> >> CC: Igor Mammedov <imammedo@redhat.com>
> >> CC: Eric Blake <eblake@redhat.com>
> >> CC: Markus Armbruster <armbru@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().
>
> Another option is to add a flag to the subtypes of TYPE_PC_DIMM, set it
> for the subtypes that should be counted here, and accumulate the sizes
> of devices where the flag is set. Requires iterating directly over the
> devices here (like qmp_pc_dimm_device_list() does under the hood) rather
> than the MemoryDeviceInfoList returned by qmp_pc_dimm_device_list(),
I'd rather not add flag to TYPE_PC_DIMM state/class as its purely balloon
qemu/guest driver limit and not related to [pc-|nv]in general.
Lets whitelist balloon supported type here.
next prev parent reply other threads:[~2016-02-03 16:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 6:51 [Qemu-devel] [PATCH v4 0/3] don't use NVDIMM for balooning Vladimir Sementsov-Ogievskiy
2016-01-28 6:51 ` [Qemu-devel] [PATCH 1/3] move get_current_ram_size to virtio-balloon.c Vladimir Sementsov-Ogievskiy
2016-01-28 6:51 ` [Qemu-devel] [PATCH 2/3] pcdimm: add 'type' field to PCDIMMDeviceInfo Vladimir Sementsov-Ogievskiy
2016-02-02 15:26 ` Markus Armbruster
2016-02-02 22:12 ` Eric Blake
2016-02-03 12:00 ` Vladimir Sementsov-Ogievskiy
2016-02-03 15:14 ` Eric Blake
2016-02-03 15:42 ` Markus Armbruster
2016-01-28 6:51 ` [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning Vladimir Sementsov-Ogievskiy
2016-02-02 15:30 ` Markus Armbruster
2016-02-03 12:01 ` Vladimir Sementsov-Ogievskiy
2016-02-02 22:13 ` Eric Blake
2016-02-03 15:42 ` Markus Armbruster
2016-02-03 16:23 ` Igor Mammedov [this message]
2016-02-03 17:21 ` Vladimir Sementsov-Ogievskiy
2016-02-04 6:20 ` Markus Armbruster
2016-02-04 10:21 ` Vladimir Sementsov-Ogievskiy
2016-02-05 9:53 ` Markus Armbruster
2016-02-05 12:00 ` Vladimir Sementsov-Ogievskiy
2016-02-02 9:49 ` [Qemu-devel] [PATCH v4 0/3] don't use NVDIMM for balooning Denis V. Lunev
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=20160203172317.1c53b88b@nial.brq.redhat.com \
--to=imammedo@redhat.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=guangrong.xiao@linux.intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.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).