From: Tang Chen <tangchen@cn.fujitsu.com>
To: Xishi Qiu <qiuxishi@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
izumi.taku@jp.fujitsu.com, Linux MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Yasuaki Ishimatsu <yasu.isimatu@gmail.com>
Subject: Re: [PATCH 2/2] memory-hotplug: remove reset_node_managed_pages() and reset_node_managed_pages() in hotadd_new_pgdat()
Date: Wed, 26 Aug 2015 15:19:19 +0800 [thread overview]
Message-ID: <55DD6877.6080709@cn.fujitsu.com> (raw)
In-Reply-To: <55DAFEEB.4050601@huawei.com>
On 08/24/2015 07:24 PM, Xishi Qiu wrote:
> ......
>>>> [ 2007.584000] On node 5 totalpages: 0
>>>> [ 2007.585000] Built 5 zonelists in Node order, mobility grouping on. Total pages: 32588823
>>>> [ 2007.594000] Policy zone: Normal
>>>> [ 2007.598000] init_memory_mapping: [mem 0x60000000000-0x607ffffffff]
>>>>
>>>>
>>>> And also, if we merge this patch, /sys/devices/system/node/nodeX/meminfo will break.
>>>>
>>> trigger call trace?
>> No. There is no error output. But if you see /sys/devices/system/node/nodeX/meminfo,
>> memory size will double because totalpages is calculated once here, and one more time
>> when onlining memory.
>>
> Hi Tang,
>
> Do you mean si_meminfo_node() -> val->totalram = managed_pages; will be added double?
> But my patch will keep it 0 in hotadd_new_pgdat(), so it will not be double, right?
>
Hi,
I mean this:
online_pages()
|--> zone->zone_pgdat->node_present_pages += onlined_pages;
It will be double.
Since meminfo data is retrieved from these kernel structures, /proc/meminfo
will be broken.
Actually speaking, reset it when hot-adding memory is not a good idea.
We should make the memory init code be suitable for both boot code and
memory hot-plug code.
Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-08-26 7:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 7:26 [PATCH 1/2] memory-hotplug: fix wrong edge when hot add a new node Xishi Qiu
2015-08-11 7:33 ` [PATCH 2/2] memory-hotplug: remove reset_node_managed_pages() and reset_node_managed_pages() in hotadd_new_pgdat() Xishi Qiu
2015-08-23 10:28 ` Tang Chen
2015-08-24 9:17 ` Xishi Qiu
2015-08-24 9:39 ` Tang Chen
2015-08-24 11:24 ` Xishi Qiu
2015-08-26 7:19 ` Tang Chen [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-17 7:14 Xishi Qiu
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=55DD6877.6080709@cn.fujitsu.com \
--to=tangchen@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=izumi.taku@jp.fujitsu.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=qiuxishi@huawei.com \
--cc=yasu.isimatu@gmail.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