Re: [Bug fix PATCH 1/2] acpi, movablemem_map: Do not zero numa_meminfo in numa_init().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, add cc Li Shaohua.

Reported-by: Li Shaohua <shli@xxxxxxxxxx>


On 02/19/2013 09:01 PM, Tang Chen wrote:
early_parse_srat() is called before numa_init(), and has initialized
numa_meminfo. So do not zero numa_meminfo in numa_init(), otherwise
we will lose memory numa info.

Signed-off-by: Tang Chen<tangchen@xxxxxxxxxxxxxx>
---
  arch/x86/mm/numa.c |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 3545585..ff3633c 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -559,10 +559,12 @@ static int __init numa_init(int (*init_func)(void))
  	for (i = 0; i<  MAX_LOCAL_APIC; i++)
  		set_apicid_to_node(i, NUMA_NO_NODE);

-	/* Do not clear numa_nodes_parsed because SRAT was parsed earlier. */
+	/*
+	 * Do not clear numa_nodes_parsed or zero numa_meminfo here, because
+	 * SRAT was parsed earlier in early_parse_srat().
+	 */
  	nodes_clear(node_possible_map);
  	nodes_clear(node_online_map);
-	memset(&numa_meminfo, 0, sizeof(numa_meminfo));
  	WARN_ON(memblock_set_node(0, ULLONG_MAX, MAX_NUMNODES));
  	numa_reset_distance();


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]