RE: [Bugme-new] [Bug 13690] New: nodes_clear cause hugepageunusable on non-NUMA machine

From: Shi, Alex
Date: Thu Jul 02 2009 - 10:14:23 EST


Yes, the patch fixes this bug!

Alex

>-----Original Message-----
>From: Yinghai Lu [mailto:yinghai@xxxxxxxxxx]
>Sent: 2009年7月2日 16:51
>To: Shi, Alex; Andrew Morton; Ingo Molnar
>Cc: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx; bugme-daemon@xxxxxxxxxxxxxxxxxxx;
>Christoph Lameter; Mel Gorman; linux-kernel@xxxxxxxxxxxxxxx; Zhang, Yanmin;
>Chen, Tim C
>Subject: Re: [Bugme-new] [Bug 13690] New: nodes_clear cause hugepage unusable
>on non-NUMA machine
>
>Alex Shi wrote:
>> The new patch works for my stoakley i386 machine. But for x86_64 machine
>> the specjbb2005 still can not run with hugepage. The specjbb2005 use the
>> same java setting as i386 system. After apply your patch, the iomem of
>> x86_64 is:
>
>please check
>
>[PATCH] x86: don't clear nodes_states[N_NORMAL_MEMORY] when numa is not
>compiled in
>
>Alex found:
>for x86_64 machine the specjbb2005 still can not run with hugepage
>
>only happens when numa is not compiled in
>
>the root cause: node_set_state will not set it back for us in that case
>
>so don't clear that when numa is not select in config
>
>Reported-by: Alex Shi <alex.shi@xxxxxxxxx>
>Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
>
>---
> arch/x86/mm/init_64.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
>Index: linux-2.6/arch/x86/mm/init_64.c
>===================================================================
>--- linux-2.6.orig/arch/x86/mm/init_64.c
>+++ linux-2.6/arch/x86/mm/init_64.c
>@@ -598,8 +598,14 @@ void __init paging_init(void)
>
> sparse_memory_present_with_active_regions(MAX_NUMNODES);
> sparse_init();
>- /* clear the default setting with node 0 */
>+#if MAX_NUMNODES > 1
>+ /*
>+ * clear the default setting with node 0
>+ * note: don't clear it, node_set_state will do nothing
>+ * (aka set it back) when numa support is not compiled in
>+ */
> nodes_clear(node_states[N_NORMAL_MEMORY]);
>+#endif
> free_area_init_nodes(max_zone_pfns);
> }
>
㈤旃??????+-遍荻?w??笔???dz罐??骅w*jg??????/??罐????璀??摺?囤??????:+v???佶>W?贽i?xPj??? -?+?d?