From: Tang Chen <tangchen@cn.fujitsu.com>
To: Igor Mammedov <imammedo@redhat.com>, Hu Tao <hutao@cn.fujitsu.com>
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
mst@redhat.com, luonengjun@huawei.com, qemu-devel@nongnu.org,
peter.huangpeng@huawei.com, pbonzini@redhat.com,
gaowanlong@cn.fujitsu.com
Subject: Re: [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break hotplug memory feature
Date: Mon, 22 Sep 2014 17:03:12 +0800 [thread overview]
Message-ID: <541FE5D0.9050705@cn.fujitsu.com> (raw)
In-Reply-To: <20140919142642.7d7fbd3d@nial.usersys.redhat.com>
Hi Igor,
On 09/19/2014 08:26 PM, Igor Mammedov wrote:
> On Wed, 17 Sep 2014 16:32:20 +0800
> Hu Tao <hutao@cn.fujitsu.com> wrote:
>
>> On Tue, Sep 16, 2014 at 06:39:15PM +0800, zhanghailiang wrote:
>>> If we do not configure numa option, memory hotplug should work as well.
>>> It should not depend on numa option.
>>>
>>> Steps to reproduce:
>>> (1) Start VM: qemu-kvm -m 1024,slots=4,maxmem=8G
>>> (2) Hotplug memory
>>> It will fail and reports:
>>> "'DIMM property node has value 0' which exceeds the number of numa nodes: 0"
>>>
>> I rememberd Tang Chen had a patch for this bug, this is what Andrey suggested:
>>
>> I thnk that there should be no
>> cases when dimm is plugged (and check from patch is fired up) without
>> actually populated NUMA, because not every OS will workaround this by
>> faking the node.
> This doesn't take in to account that dimm device by itself has nothing to do
> with numa (numa is just optional property of its representation in ACPI land
> and nothing else).
>
> In case initial memory is converted to dimm devices, qemu can be
> started without numa option and it still must work.
>
> So I'm in favor of this path.
I just did some tests. Even if I modify qemu code and make hotpluggable
bit in SRAT 0,
memory hotplug will still work on Linux guest, which means Linux kernel
doesn't check
SRAT info after system is up when doing memory hotplug.
I did the following modification in hw/i386/acpi-build.c
- ram_addr_t hotplugabble_address_space_size =
- object_property_get_int(OBJECT(pcms), PC_MACHINE_MEMHP_REGION_SIZE,
- NULL);
+ ram_addr_t hotplugabble_address_space_size = 0;
And when the guest is up, no memory should be hotpluggable, I think. But
I hot-added
memory successfully.
IMHO, I think memory hotplug should based on ACPI on Linux. And SRAT
tells system
which memory ranges are hotpluggable, and we should follow it. So I
think Linux kernel
has some problem in this issue.
I'd like to fix it like this:
1. Send patches to make Linux kernel to check SRAT info when doing
memory hotplug.
(Now, SRAT is only checked at boot time.)
2. In qemu, when users gave a memory hotplug option without NUMA
options, we create
node0 and node1, and make node1 hotpluggable.
This is because when using MOVABLE_NODE, node0 in which the kernel
resides in should
not be hotpluggable.
Of course, make part of memory in node0 hotpluggable is OK, but on
a real machine, no
one will do this, I think. So I suggest above idea.
Thanks. :)
>
>> https://lists.nongnu.org/archive/html/qemu-devel/2014-08/msg04587.html
>>
>> Have you tested this patch with Windows guest?
>>
>> Regards,
>> Hu
>
> .
>
next prev parent reply other threads:[~2014-09-22 9:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 10:39 [Qemu-devel] [PATCH 0/2] fix two bugs about numa _and_ hotplug memory feature zhanghailiang
2014-09-16 10:39 ` [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break " zhanghailiang
2014-09-17 8:32 ` Hu Tao
2014-09-17 9:25 ` zhanghailiang
2014-09-17 10:00 ` Tang Chen
2014-09-17 10:19 ` Andrey Korolyov
2014-09-18 0:58 ` Hu Tao
2014-09-19 12:26 ` Igor Mammedov
2014-09-22 9:03 ` Tang Chen [this message]
2014-09-22 9:46 ` zhanghailiang
2014-09-23 8:40 ` Igor Mammedov
2014-09-23 8:58 ` Tang Chen
2014-09-23 10:11 ` zhanghailiang
2014-09-23 10:32 ` Tang Chen
2014-09-23 11:12 ` Igor Mammedov
2014-09-23 12:38 ` zhanghailiang
2014-09-19 12:37 ` Igor Mammedov
2014-09-22 11:17 ` Michael S. Tsirkin
2014-09-23 9:01 ` Igor Mammedov
2014-09-23 10:07 ` zhanghailiang
2014-09-23 11:13 ` Igor Mammedov
2014-09-16 10:39 ` [Qemu-devel] [PATCH 2/2] numa/pc-dimm: Fix stat of memory size in node when hotplug memory zhanghailiang
2014-09-16 11:20 ` Igor Mammedov
2014-09-17 8:22 ` zhanghailiang
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=541FE5D0.9050705@cn.fujitsu.com \
--to=tangchen@cn.fujitsu.com \
--cc=gaowanlong@cn.fujitsu.com \
--cc=hutao@cn.fujitsu.com \
--cc=imammedo@redhat.com \
--cc=luonengjun@huawei.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=zhang.zhanghailiang@huawei.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).