[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning |
Date: |
Thu, 04 Feb 2016 07:20:45 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Vladimir Sementsov-Ogievskiy <address@hidden> writes:
> On 03.02.2016 18:42, Markus Armbruster wrote:
>> Eric Blake <address@hidden> 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 <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>
>>>> ---
>>>> @@ -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(),
> It was my first approach but it was rejected)
>
> As another option I can make a function iterating over the devices and
> return list of them, and then use it instead of
> qmp_pc_dimm_device_list.. Then, I'll have pointers to devices and can
> use object_dynamic_cast.
I fail to see how splitting a tree walk doing stuff into a tree walk
creating a list and a list walk doing stuff makes things better :)
Anyway, you guys figure it out. The only part where I get involved is
QAPI design.
- Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning, Markus Armbruster, 2016/02/02
- Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning, Eric Blake, 2016/02/02
- Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning, Markus Armbruster, 2016/02/03
- Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning, Igor Mammedov, 2016/02/03
- Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning, Vladimir Sementsov-Ogievskiy, 2016/02/03
- Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning, Vladimir Sementsov-Ogievskiy, 2016/02/04
- Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning, Markus Armbruster, 2016/02/05
- Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning, Vladimir Sementsov-Ogievskiy, 2016/02/05