linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [Bug fix PATCH 0/2] Bug fix for movablemem_map boot option.
@ 2013-02-19 13:01 Tang Chen
  2013-02-19 13:01 ` [Bug fix PATCH 1/2] acpi, movablemem_map: Do not zero numa_meminfo in numa_init() Tang Chen
  2013-02-19 13:01 ` [Bug fix PATCH 2/2] acpi, movablemem_map: Set numa_nodes_hotplug nodemask when using SRAT info Tang Chen
  0 siblings, 2 replies; 4+ messages in thread
From: Tang Chen @ 2013-02-19 13:01 UTC (permalink / raw)
  To: akpm, jiang.liu, wujianguo, hpa, wency, laijs, linfeng, yinghai,
	isimatu.yasuaki, rob, kosaki.motohiro, minchan.kim, mgorman,
	rientjes, guz.fnst, rusty, lliubbo, jaegeuk.hanse, tony.luck,
	glommer
  Cc: linux-kernel, linux-mm

Two bug fix patches for movablemem_map boot option.

root (2):
  acpi, movablemem_map: Do not zero numa_meminfo in numa_init().
  acpi, movablemem_map: Set numa_nodes_hotplug nodemask when using SRAT
    info.

 arch/x86/mm/numa.c |    6 ++++--
 arch/x86/mm/srat.c |    6 ++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fix PATCH 1/2] acpi, movablemem_map: Do not zero numa_meminfo in numa_init().
  2013-02-19 13:01 [Bug fix PATCH 0/2] Bug fix for movablemem_map boot option Tang Chen
@ 2013-02-19 13:01 ` Tang Chen
  2013-02-19 13:16   ` Tang Chen
  2013-02-19 13:01 ` [Bug fix PATCH 2/2] acpi, movablemem_map: Set numa_nodes_hotplug nodemask when using SRAT info Tang Chen
  1 sibling, 1 reply; 4+ messages in thread
From: Tang Chen @ 2013-02-19 13:01 UTC (permalink / raw)
  To: akpm, jiang.liu, wujianguo, hpa, wency, laijs, linfeng, yinghai,
	isimatu.yasuaki, rob, kosaki.motohiro, minchan.kim, mgorman,
	rientjes, guz.fnst, rusty, lliubbo, jaegeuk.hanse, tony.luck,
	glommer
  Cc: linux-kernel, linux-mm

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@cn.fujitsu.com>
---
 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();
 
-- 
1.7.1

--
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>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Bug fix PATCH 2/2] acpi, movablemem_map: Set numa_nodes_hotplug nodemask when using SRAT info.
  2013-02-19 13:01 [Bug fix PATCH 0/2] Bug fix for movablemem_map boot option Tang Chen
  2013-02-19 13:01 ` [Bug fix PATCH 1/2] acpi, movablemem_map: Do not zero numa_meminfo in numa_init() Tang Chen
@ 2013-02-19 13:01 ` Tang Chen
  1 sibling, 0 replies; 4+ messages in thread
From: Tang Chen @ 2013-02-19 13:01 UTC (permalink / raw)
  To: akpm, jiang.liu, wujianguo, hpa, wency, laijs, linfeng, yinghai,
	isimatu.yasuaki, rob, kosaki.motohiro, minchan.kim, mgorman,
	rientjes, guz.fnst, rusty, lliubbo, jaegeuk.hanse, tony.luck,
	glommer
  Cc: linux-kernel, linux-mm

We should also set movablemem_map.numa_nodes_hotplug nodemask when we
insert a hot-pluggable range in SRAT into movablemem_map.map[].

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 arch/x86/mm/srat.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c
index b20b5b7..62ba97b 100644
--- a/arch/x86/mm/srat.c
+++ b/arch/x86/mm/srat.c
@@ -164,6 +164,12 @@ handle_movablemem(int node, u64 start, u64 end, u32 hotpluggable)
 	 */
 	if (hotpluggable && movablemem_map.acpi) {
 		insert_movablemem_map(start_pfn, end_pfn);
+
+		/*
+		 * numa_nodes_hotplug nodemask represents which nodes are put
+		 * into movablemem_map.map[].
+		 */
+		node_set(node, movablemem_map.numa_nodes_hotplug);
 		goto out;
 	}
 
-- 
1.7.1

--
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>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Bug fix PATCH 1/2] acpi, movablemem_map: Do not zero numa_meminfo in numa_init().
  2013-02-19 13:01 ` [Bug fix PATCH 1/2] acpi, movablemem_map: Do not zero numa_meminfo in numa_init() Tang Chen
@ 2013-02-19 13:16   ` Tang Chen
  0 siblings, 0 replies; 4+ messages in thread
From: Tang Chen @ 2013-02-19 13:16 UTC (permalink / raw)
  To: akpm, jiang.liu, wujianguo, hpa, wency, laijs, linfeng, yinghai,
	isimatu.yasuaki, rob, kosaki.motohiro, minchan.kim, mgorman,
	rientjes, guz.fnst, rusty, lliubbo, jaegeuk.hanse, tony.luck,
	glommer, Shaohua Li
  Cc: linux-kernel, linux-mm

Sorry, add cc Li Shaohua.

Reported-by: Li Shaohua <shli@kernel.org>


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@cn.fujitsu.com>
> ---
>   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@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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-19 13:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-19 13:01 [Bug fix PATCH 0/2] Bug fix for movablemem_map boot option Tang Chen
2013-02-19 13:01 ` [Bug fix PATCH 1/2] acpi, movablemem_map: Do not zero numa_meminfo in numa_init() Tang Chen
2013-02-19 13:16   ` Tang Chen
2013-02-19 13:01 ` [Bug fix PATCH 2/2] acpi, movablemem_map: Set numa_nodes_hotplug nodemask when using SRAT info Tang Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).