All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: guangrong.xiao@linux.intel.com, mst@redhat.com,
	qemu-devel@nongnu.org, armbru@redhat.com, stefanha@redhat.com,
	cornelia.huck@de.ibm.com, den@openvz.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH 5/5] balloon: Use only 'pc-dimm' type dimm for ballooning
Date: Fri, 5 Feb 2016 17:09:58 +0300	[thread overview]
Message-ID: <56B4AD36.4030903@virtuozzo.com> (raw)
In-Reply-To: <20160205135854.0d0e6fae@nial.brq.redhat.com>

On 05.02.2016 15:58, Igor Mammedov wrote:
> On Fri,  5 Feb 2016 11:19:01 +0300
> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> wrote:
>
>> For now there are only two dimm's: pc-dimm and nvdimm. This patch is
>> actually needed to disable ballooning on nvdimm. But, to avoid future
>> bugs, instead of disallowing nvdimm, we allow only pc-dimm. So, if
>> someone adds new dimm which should be balloon-able, then this ability
>> should be explicitly specified here.
>>
>> Why ballooning for nvdimm should be disabled for now:
>>
>> 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>
>> ---
>>   hw/virtio/virtio-balloon.c | 6 +++++-
>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
>> index b9c1964..0415e07 100644
>> --- a/hw/virtio/virtio-balloon.c
>> +++ b/hw/virtio/virtio-balloon.c
>> @@ -18,6 +18,7 @@
>>   #include "qemu-common.h"
>>   #include "hw/virtio/virtio.h"
>>   #include "hw/i386/pc.h"
>> +#include "hw/mem/nvdimm.h"
> Is this include still needed?

Yes, for TYPE_PC_DIMM

>
>>   #include "cpu.h"
>>   #include "sysemu/balloon.h"
>>   #include "hw/virtio/virtio-balloon.h"
>> @@ -302,7 +303,10 @@ static ram_addr_t get_current_ram_size(void)
>>       pc_dimm_build_list(qdev_get_machine(), &list);
>>       for (item = list; item; item = g_slist_next(item)) {
>>           PCDIMMDevice *dimm = item->data;
>> -        size += object_property_get_int(OBJECT(dimm), PC_DIMM_SIZE_PROP, NULL);
>> +        if (!strcmp(object_get_typename(OBJECT(dimm)), TYPE_PC_DIMM)) {
>> +            size += object_property_get_int(OBJECT(dimm), PC_DIMM_SIZE_PROP,
>> +                                            NULL);
>> +        }
>>       }
>>       g_slist_free(list);
>>   


-- 
Best regards,
Vladimir

  reply	other threads:[~2016-02-05 14:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05  8:18 [Qemu-devel] [PATCH 0/5] don't use NVDIMM for balooning Vladimir Sementsov-Ogievskiy
2016-02-05  8:18 ` [Qemu-devel] [PATCH 1/5] move get_current_ram_size to virtio-balloon.c Vladimir Sementsov-Ogievskiy
2016-02-05  8:18 ` [Qemu-devel] [PATCH 2/5] pc-dimm: rename pc_dimm_built_list() Vladimir Sementsov-Ogievskiy
2016-02-05 12:50   ` Igor Mammedov
2016-02-05  8:18 ` [Qemu-devel] [PATCH 3/5] pc-dimm: add pc_dimm_build_list() Vladimir Sementsov-Ogievskiy
2016-02-05 12:51   ` Igor Mammedov
2016-02-05 14:08     ` Vladimir Sementsov-Ogievskiy
2016-02-05  8:19 ` [Qemu-devel] [PATCH 4/5] virtio-balloon: rewrite get_current_ram_size() Vladimir Sementsov-Ogievskiy
2016-02-05 12:57   ` Igor Mammedov
2016-02-05 14:12     ` Vladimir Sementsov-Ogievskiy
2016-02-05 14:53       ` Igor Mammedov
2016-02-05  8:19 ` [Qemu-devel] [PATCH 5/5] balloon: Use only 'pc-dimm' type dimm for ballooning Vladimir Sementsov-Ogievskiy
2016-02-05 12:58   ` Igor Mammedov
2016-02-05 14:09     ` Vladimir Sementsov-Ogievskiy [this message]
2016-02-05 14:55       ` Igor Mammedov
2016-02-05 16:22         ` Vladimir Sementsov-Ogievskiy
2016-02-05  8:21 ` [Qemu-devel] [PATCH v6 0/5] don't use NVDIMM for balooning Vladimir Sementsov-Ogievskiy
  -- strict thread matches above, loose matches on Subject: below --
2016-02-10  8:49 [Qemu-devel] [PATCH v7 " Vladimir Sementsov-Ogievskiy
2016-02-10  8:49 ` [Qemu-devel] [PATCH 5/5] balloon: Use only 'pc-dimm' type dimm for ballooning Vladimir Sementsov-Ogievskiy
2016-02-04 11:37 [Qemu-devel] [PATCH v5 0/5] don't use NVDIMM for balooning Vladimir Sementsov-Ogievskiy
2016-02-04 11:37 ` [Qemu-devel] [PATCH 5/5] balloon: Use only 'pc-dimm' type dimm for ballooning Vladimir Sementsov-Ogievskiy

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=56B4AD36.4030903@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=den@openvz.org \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=imammedo@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.