From: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: qiuxishi <qiuxishi@gmail.com>,
mgorman@suse.de, tony.luck@intel.com,
Jiang Liu <jiang.liu@huawei.com>,
qiuxishi@huawei.com, bessel.wang@huawei.com,
wujianguo@huawei.com, paul.gortmaker@windriver.com,
kamezawa.hiroyu@jp.fujitsu.com, kosaki.motohiro@jp.fujitsu.com,
rientjes@google.com, Minchan Kim <minchan@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Wen Congyang <wency@cn.fujitsu.com>
Subject: Re: [PATCH RESEND] memory hotplug: fix a double register section info bug
Date: Tue, 18 Sep 2012 09:11:27 +0900 [thread overview]
Message-ID: <5057BC2F.3020008@jp.fujitsu.com> (raw)
In-Reply-To: <20120914131428.1f530681.akpm@linux-foundation.org>
2012/09/15 5:14, Andrew Morton wrote:
> On Fri, 14 Sep 2012 20:00:09 +0900
> Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> wrote:
>
>>> @@ -187,9 +184,10 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
>>> end_pfn = pfn + pgdat->node_spanned_pages;
>>>
>>> /* register_section info */
>>> - for (; pfn < end_pfn; pfn += PAGES_PER_SECTION)
>>> - register_page_bootmem_info_section(pfn);
>>> -
>>> + for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
>>> + if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
>>
>> I cannot judge whether your configuration is correct or not.
>> Thus if it is correct, I want a comment of why the node check is
>> needed. In usual configuration, a node does not span the other one.
>> So it is natural that "pfn_to_nid(pfn) is same as "pgdat->node_id".
>> Thus we may remove the node check in the future.
>
> yup. How does this look?
Looks good to me.
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
>
> --- a/mm/memory_hotplug.c~memory-hotplug-fix-a-double-register-section-info-bug-fix
> +++ a/mm/memory_hotplug.c
> @@ -185,6 +185,12 @@ void register_page_bootmem_info_node(str
>
> /* register_section info */
> for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
> + /*
> + * Some platforms can assign the same pfn to multiple nodes - on
> + * node0 as well as nodeN. To avoid registering a pfn against
> + * multiple nodes we check that this pfn does not already
> + * reside in some other node.
> + */
> if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
> register_page_bootmem_info_section(pfn);
> }
> _
>
> --
> 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>
>
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: qiuxishi <qiuxishi@gmail.com>, <mgorman@suse.de>,
<tony.luck@intel.com>, Jiang Liu <jiang.liu@huawei.com>,
<qiuxishi@huawei.com>, <bessel.wang@huawei.com>,
<wujianguo@huawei.com>, <paul.gortmaker@windriver.com>,
<kamezawa.hiroyu@jp.fujitsu.com>,
<kosaki.motohiro@jp.fujitsu.com>, <rientjes@google.com>,
Minchan Kim <minchan@kernel.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>,
Wen Congyang <wency@cn.fujitsu.com>
Subject: Re: [PATCH RESEND] memory hotplug: fix a double register section info bug
Date: Tue, 18 Sep 2012 09:11:27 +0900 [thread overview]
Message-ID: <5057BC2F.3020008@jp.fujitsu.com> (raw)
In-Reply-To: <20120914131428.1f530681.akpm@linux-foundation.org>
2012/09/15 5:14, Andrew Morton wrote:
> On Fri, 14 Sep 2012 20:00:09 +0900
> Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> wrote:
>
>>> @@ -187,9 +184,10 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
>>> end_pfn = pfn + pgdat->node_spanned_pages;
>>>
>>> /* register_section info */
>>> - for (; pfn < end_pfn; pfn += PAGES_PER_SECTION)
>>> - register_page_bootmem_info_section(pfn);
>>> -
>>> + for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
>>> + if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
>>
>> I cannot judge whether your configuration is correct or not.
>> Thus if it is correct, I want a comment of why the node check is
>> needed. In usual configuration, a node does not span the other one.
>> So it is natural that "pfn_to_nid(pfn) is same as "pgdat->node_id".
>> Thus we may remove the node check in the future.
>
> yup. How does this look?
Looks good to me.
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
>
> --- a/mm/memory_hotplug.c~memory-hotplug-fix-a-double-register-section-info-bug-fix
> +++ a/mm/memory_hotplug.c
> @@ -185,6 +185,12 @@ void register_page_bootmem_info_node(str
>
> /* register_section info */
> for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
> + /*
> + * Some platforms can assign the same pfn to multiple nodes - on
> + * node0 as well as nodeN. To avoid registering a pfn against
> + * multiple nodes we check that this pfn does not already
> + * reside in some other node.
> + */
> if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
> register_page_bootmem_info_section(pfn);
> }
> _
>
> --
> 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:[~2012-09-18 0:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 3:43 [PATCH RESEND] memory hotplug: fix a double register section info bug qiuxishi
2012-09-14 3:43 ` qiuxishi
2012-09-14 9:52 ` Mel Gorman
2012-09-14 9:52 ` Mel Gorman
2012-09-14 16:24 ` Luck, Tony
2012-09-14 16:24 ` Luck, Tony
2012-09-17 14:21 ` Mel Gorman
2012-09-17 14:21 ` Mel Gorman
2012-09-14 11:00 ` Yasuaki Ishimatsu
2012-09-14 11:00 ` Yasuaki Ishimatsu
2012-09-14 20:14 ` Andrew Morton
2012-09-14 20:14 ` Andrew Morton
2012-09-16 10:14 ` xishi qiu
2012-09-18 0:11 ` Yasuaki Ishimatsu [this message]
2012-09-18 0:11 ` Yasuaki Ishimatsu
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=5057BC2F.3020008@jp.fujitsu.com \
--to=isimatu.yasuaki@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=bessel.wang@huawei.com \
--cc=jiang.liu@huawei.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=qiuxishi@gmail.com \
--cc=qiuxishi@huawei.com \
--cc=rientjes@google.com \
--cc=tony.luck@intel.com \
--cc=wency@cn.fujitsu.com \
--cc=wujianguo@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 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.