From: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, vbabka@suse.cz,
rientjes@google.com, n-horiguchi@ah.jp.nec.com,
zhenzhang.zhang@huawei.com, wangnan0@huawei.com, fabf@skynet.be
Subject: Re: [PATCH] mm/memory hotplug: print the last vmemmap region at the end of hot add memory
Date: Thu, 11 Jun 2015 18:41:21 +0800 [thread overview]
Message-ID: <557965D1.7020009@cn.fujitsu.com> (raw)
In-Reply-To: <20150609132908.c5a9d2c9714bd7a8f33ffde8@linux-foundation.org>
On 06/10/2015 04:29 AM, Andrew Morton wrote:
> On Tue, 9 Jun 2015 11:41:28 +0800 Zhu Guihua <zhugh.fnst@cn.fujitsu.com> wrote:
>
>>>> --- a/mm/memory_hotplug.c
>>>> +++ b/mm/memory_hotplug.c
>>>> @@ -513,6 +513,7 @@ int __ref __add_pages(int nid, struct zone *zone, unsigned long phys_start_pfn,
>>>> break;
>>>> err = 0;
>>>> }
>>>> + vmemmap_populate_print_last();
>>>>
>>>> return err;
>>>> }
>>> vmemmap_populate_print_last() is only available on x86_64, when
>>> CONFIG_SPARSEMEM_VMEMMAP=y. Are you sure this won't break builds?
>> I tried this on i386 and on x86_64 when CONFIG_SPARSEMEM_VMEMMAP=n ,
>> it builds ok.
> With powerpc:
>
> akpm3:/usr/src/25> make allmodconfig
> akpm3:/usr/src/25> make mm/memory_hotplug.o
> akpm3:/usr/src/25> nm mm/memory_hotplug.o | grep vmemmap_populate_print_last
> U .vmemmap_populate_print_last
> akpm3:/usr/src/25> grep -r vmemmap_populate_print_last arch/powerpc
> akpm3:/usr/src/25>
>
> So I think that's going to break.
>
> I expect ia64 will break also, but I didn't investigate.
> .
>
There is
void __weak __meminit vmemmap_populate_print last(void)
in /mm/sparse.c, so I think this won't break builds.
And I found the function was invoked in void __init sparse_init(void)
without
CONFIG_SPARSEMEM_VMEMMAP=y.
I also tried this on arm, it builds ok too.
--
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: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
<vbabka@suse.cz>, <rientjes@google.com>,
<n-horiguchi@ah.jp.nec.com>, <zhenzhang.zhang@huawei.com>,
<wangnan0@huawei.com>, <fabf@skynet.be>
Subject: Re: [PATCH] mm/memory hotplug: print the last vmemmap region at the end of hot add memory
Date: Thu, 11 Jun 2015 18:41:21 +0800 [thread overview]
Message-ID: <557965D1.7020009@cn.fujitsu.com> (raw)
In-Reply-To: <20150609132908.c5a9d2c9714bd7a8f33ffde8@linux-foundation.org>
On 06/10/2015 04:29 AM, Andrew Morton wrote:
> On Tue, 9 Jun 2015 11:41:28 +0800 Zhu Guihua <zhugh.fnst@cn.fujitsu.com> wrote:
>
>>>> --- a/mm/memory_hotplug.c
>>>> +++ b/mm/memory_hotplug.c
>>>> @@ -513,6 +513,7 @@ int __ref __add_pages(int nid, struct zone *zone, unsigned long phys_start_pfn,
>>>> break;
>>>> err = 0;
>>>> }
>>>> + vmemmap_populate_print_last();
>>>>
>>>> return err;
>>>> }
>>> vmemmap_populate_print_last() is only available on x86_64, when
>>> CONFIG_SPARSEMEM_VMEMMAP=y. Are you sure this won't break builds?
>> I tried this on i386 and on x86_64 when CONFIG_SPARSEMEM_VMEMMAP=n ,
>> it builds ok.
> With powerpc:
>
> akpm3:/usr/src/25> make allmodconfig
> akpm3:/usr/src/25> make mm/memory_hotplug.o
> akpm3:/usr/src/25> nm mm/memory_hotplug.o | grep vmemmap_populate_print_last
> U .vmemmap_populate_print_last
> akpm3:/usr/src/25> grep -r vmemmap_populate_print_last arch/powerpc
> akpm3:/usr/src/25>
>
> So I think that's going to break.
>
> I expect ia64 will break also, but I didn't investigate.
> .
>
There is
void __weak __meminit vmemmap_populate_print last(void)
in /mm/sparse.c, so I think this won't break builds.
And I found the function was invoked in void __init sparse_init(void)
without
CONFIG_SPARSEMEM_VMEMMAP=y.
I also tried this on arm, it builds ok too.
next prev parent reply other threads:[~2015-06-11 10:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 6:44 [PATCH] mm/memory hotplug: print the last vmemmap region at the end of hot add memory Zhu Guihua
2015-06-08 6:44 ` Zhu Guihua
2015-06-08 8:52 ` Naoya Horiguchi
2015-06-08 8:52 ` Naoya Horiguchi
2015-06-08 23:30 ` Andrew Morton
2015-06-08 23:30 ` Andrew Morton
2015-06-09 3:41 ` Zhu Guihua
2015-06-09 3:41 ` Zhu Guihua
2015-06-09 20:29 ` Andrew Morton
2015-06-09 20:29 ` Andrew Morton
2015-06-11 10:41 ` Zhu Guihua [this message]
2015-06-11 10:41 ` Zhu Guihua
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=557965D1.7020009@cn.fujitsu.com \
--to=zhugh.fnst@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=wangnan0@huawei.com \
--cc=zhenzhang.zhang@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.