Re: [PATCH v3 0/3] ACPI: container hot remove support.

2012-11-26 Thread Tang Chen
On 11/27/2012 09:08 AM, Hanjun Guo wrote: On 2012/11/26 14:06, Tang Chen wrote: On 11/26/2012 01:42 PM, Hanjun Guo wrote: Hi all, I think Yasuaki mentioned the key point for the container device remove, that is dependency. Currently, container, processor, and memory hotpulg are managed by

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-26 Thread Tang Chen
On 11/27/2012 11:10 AM, wujianguo wrote: On 2012-11-23 18:44, Tang Chen wrote: [What we are doing] This patchset provide a boot option for user to specify ZONE_MOVABLE memory map for each node in the system. movablecore_map=nn[KMG]@ss[KMG] Hi Tang, DMA address can't be s

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-27 Thread Tang Chen
On 11/27/2012 04:00 PM, Bob Liu wrote: Hi Tang, On Fri, Nov 23, 2012 at 6:44 PM, Tang Chen wrote: [What we are doing] This patchset provide a boot option for user to specify ZONE_MOVABLE memory map for each node in the system. movablecore_map=nn[KMG]@ss[KMG] This option make sure memory

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-27 Thread Tang Chen
On 11/27/2012 08:09 PM, Bob Liu wrote: On Tue, Nov 27, 2012 at 4:29 PM, Tang Chen wrote: Hi Liu, This feature is used in memory hotplug. In order to implement a whole node hotplug, we need to make sure the node contains no kernel memory, because memory used by kernel could not be migrated

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-27 Thread Tang Chen
On 11/27/2012 11:10 AM, wujianguo wrote: Hi Tang, DMA address can't be set as movable, if some one boot kernel with movablecore_map=4G@0xa0 or other memory region that contains DMA address, system maybe boot failed. Should this case be handled or mentioned in the change log and kerne

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-27 Thread Tang Chen
ed to do the work in patch 3~5, right ? Thanks. :) On 11/28/2012 12:08 PM, Jiang Liu wrote: On 2012-11-28 11:24, Bob Liu wrote: On Tue, Nov 27, 2012 at 8:49 PM, Tang Chen wrote: On 11/27/2012 08:09 PM, Bob Liu wrote: On Tue, Nov 27, 2012 at 4:29 PM, Tang Chen wrote: Hi Liu, This fea

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-28 Thread Tang Chen
On 11/29/2012 08:43 AM, Jaegeuk Hanse wrote: Hi Tang, I haven't read the patchset yet, but could you give a short describe how you design your implementation in this patchset? Regards, Jaegeuk Hi Jaegeuk, Thanks for your joining in. :) This feature is used in memory hotplug. In order to i

Re: [Patch v4 00/12] memory-hotplug: hot-remove physical memory

2012-11-29 Thread Tang Chen
Hi Andrew, On 11/28/2012 03:27 AM, Andrew Morton wrote: - acpi framework https://lkml.org/lkml/2012/10/26/175 What's happening with the acpi framework? has it received any feedback from the ACPI developers? About ACPI framework, we are trying to do the following. The memory device

Re: [PATCH v1 part1 0/9] Introduce movablemem_map boot option.

2013-03-18 Thread Tang Chen
Hi Will, On 03/17/2013 08:25 AM, Will Huck wrote: http://marc.info/?l=linux-mm&m=136014458829566&w=2 It seems that Mel don't like this idea. Thank you for reminding me this. And yes, I have read that email. :) And about this boot option, we have had a long discussion before. Please refer

[RESEND PATCH part1 1/9] x86: get pg_data_t's memory from other node

2013-03-21 Thread Tang Chen
fails. Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Lai Jiangshan Signed-off-by: Tang Chen Signed-off-by: Jiang Liu --- arch/x86/mm/numa.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 11acdf6..4f754e6 100644 --- a/arch/x

[RESEND PATCH part1 7/9] x86, mm, numa, acpi: Sanitize zone_movable_limit[].

2013-03-21 Thread Tang Chen
that sanitize_zone_movable_limit() could use it. This is pointed out by Wu Jianguo . Reported-by: Wu Jianguo Signed-off-by: Tang Chen Signed-off-by: Liu Jiang Reviewed-by: Wen Congyang Reviewed-by: Lai Jiangshan Tested-by: Lin Feng --- mm/page_alloc.c | 55

[RFC PATCH part2 0/4] Allow allocating pagetable on local node in movablemem_map.

2013-03-21 Thread Tang Chen
) When hot-removing, we are able to find out these ranges, and free them first. This is very important. Also, hot-add logic needs to be modified, too. As Yinghai mentioned before, I think we can make memblock alive when memory is hot-added. And go with the same logic as it is when booting. How do

[PATCH part2 1/4] x86, mm, numa, acpi: Introduce numa_meminfo_all to store all the numa meminfo.

2013-03-21 Thread Tang Chen
a_meminfo doesn't have the whole memory info. In order to sanitize movablemem_map.map[] after memory mapping initialziation, we need the whole SRAT info. So this patch introduces global variable numa_meminfo_all to store the whole numa memory info. Signed-off-by: Tang Chen --- arch/x86/mm/

[PATCH part2 3/4] x86, mm, numa, acpi: Consider hotplug info when cleanup numa_meminfo.

2013-03-21 Thread Tang Chen
minfo() logic like this: Merge blocks with the same hotpluggable type on the same node, holes between which don't overlap with memory on other nodes. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/x86

[PATCH part2 4/4] x86, mm, numa, acpi: Sanitize movablemem_map after memory mapping initialized.

2013-03-21 Thread Tang Chen
can prevent allocation in movable area but with pagetable and vmemmap pages (used by kernel) in local node. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c | 125 ++ arch/x86/mm/srat.c | 139 ++- 2 files

[PATCH part2 2/4] x86, mm, numa, acpi: Introduce hotplug info into struct numa_meminfo.

2013-03-21 Thread Tang Chen
numa_add_memblk() - numa_add_memblk_to() And the following callers: - numaq_register_node() - dummy_numa_init() - amd_numa_init() - acpi_numa_memory_affinity_init() in x86 Signed-off-by: Tang Chen --- arch/x86/include/asm/numa.h |3 ++- arch/x86/kernel/apic/numaq_32.c |

[RESEND PATCH part1 6/9] x86, mm, numa, acpi: Support getting hotplug info from SRAT.

2013-03-21 Thread Tang Chen
If users don't want to lose NUMA performance, just don't use it. Signed-off-by: Tang Chen --- Documentation/kernel-parameters.txt | 15 +++ arch/x86/mm/srat.c | 74 +-- include/linux/mm.h |2 +

[RESEND PATCH part1 8/9] x86, mm, numa, acpi: make movablemem_map have higher priority

2013-03-21 Thread Tang Chen
If kernelcore or movablecore is specified at the same time with movablemem_map, movablemem_map will have higher priority to be satisfied. This patch will make find_zone_movable_pfns_for_nodes() calculate zone_movable_pfn[] with the limit from zone_movable_limit[]. Signed-off-by: Tang Chen

[RESEND PATCH part1 5/9] x86, mm, numa, acpi: Extend movablemem_map to the end of each node.

2013-03-21 Thread Tang Chen
ing memory * on ZONE_MOVABLE at boot time. * * NOTE: In this case, SRAT info will be ingored. */ Signed-off-by: Tang Chen --- arch/x86/mm/srat.c | 34 ++ 1 files changed, 30 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/sra

[RESEND PATCH part1 9/9] x86, mm, numa, acpi: Memblock limit with movablemem_map

2013-03-21 Thread Tang Chen
memblock_overlaps_region() is not. So add CONFIG_HAVE_MEMBLOCK_NODE_MAP to protect the use of movablecore_map in memblock_overlaps_region(). Signed-off-by: Tang Chen Reviewed-by: Wen Congyang Reviewed-by: Lai Jiangshan Tested-by: Lin Feng Reported-by: Stephen Rothwell --- include/linux/memblock.h |2

[RESEND PATCH part1 3/9] x86, mm, numa, acpi: Add movable_memmap boot option.

2013-03-21 Thread Tang Chen
: Tang Chen Signed-off-by: Lai Jiangshan Reviewed-by: Wen Congyang Tested-by: Lin Feng --- Documentation/kernel-parameters.txt | 21 ++ include/linux/mm.h | 11 +++ mm/page_alloc.c | 131 +++ 3 files changed, 163

[RESEND PATCH part1 4/9] x86, mm, numa, acpi: Introduce zone_movable_limit[] to store start pfn of ZONE_MOVABLE.

2013-03-21 Thread Tang Chen
is used to store the start pfn of each node's ZONE_MOVABLE. We update it each time we parsed a SRAT memory entry if necessary. Signed-off-by: Tang Chen --- arch/x86/mm/srat.c | 29 + include/linux/mm.h |9 + mm/page_alloc.c|

[RESEND PATCH part1 0/9] Introduce movablemem_map boot option.

2013-03-21 Thread Tang Chen
higher priority to be satisfied. 3) This option has no conflict with memmap option. Tang Chen (8): acpi: Print hotplug info in SRAT. x86, mm, numa, acpi: Add movable_memmap boot option. x86, mm, numa, acpi: Introduce zone_movable_limit[] to store start pfn of ZONE_MOVABLE. x86, mm, numa

[RESEND PATCH part1 2/9] acpi: Print hotplug info in SRAT.

2013-03-21 Thread Tang Chen
The Hot Pluggable field in SRAT points out if the memory could be hotplugged while the system is running. It is useful to print out this info when parsing SRAT. Signed-off-by: Tang Chen --- arch/x86/mm/srat.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch

Re: [PATCH 3/3] acpi, memory-hotplug: Support getting hotplug info from SRAT.

2013-02-05 Thread Tang Chen
On 02/05/2013 07:26 AM, Andrew Morton wrote: On Fri, 25 Jan 2013 17:42:09 +0800 Tang Chen wrote: We now provide an option for users who don't want to specify physical memory address in kernel commandline. /* * For movablemem_map=acpi: * *

Re: [PATCH v5 01/14] memory-hotplug: try to offline the memory twice to avoid dependence

2013-02-05 Thread Tang Chen
Hi Glauber, all, An old thing I want to discuss with you. :) On 01/09/2013 11:09 PM, Glauber Costa wrote: memory can't be offlined when CONFIG_MEMCG is selected. For example: there is a memory device on node 1. The address range is [1G, 1.5G). You will find 4 new directories memory8, memory9, m

Re: [PATCH linux-next] x86/mm: Fix compile warning in remove_pagetable()

2013-02-06 Thread Tang Chen
On 02/06/2013 04:27 PM, David Rientjes wrote: On Tue, 5 Feb 2013, Shuah Khan wrote: diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 67bad4b..ed78400 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -987,7 +987,7 @@ remove_pud_table(pud_t *pud_start, unsigned lo

Re: [PATCH v5 01/14] memory-hotplug: try to offline the memory twice to avoid dependence

2013-02-06 Thread Tang Chen
Hi all, On 02/06/2013 11:07 AM, Tang Chen wrote: Hi Glauber, all, An old thing I want to discuss with you. :) On 01/09/2013 11:09 PM, Glauber Costa wrote: memory can't be offlined when CONFIG_MEMCG is selected. For example: there is a memory device on node 1. The address range is [1G,

Re: [PATCH v5 01/14] memory-hotplug: try to offline the memory twice to avoid dependence

2013-02-06 Thread Tang Chen
On 02/06/2013 05:17 PM, Tang Chen wrote: Hi all, On 02/06/2013 11:07 AM, Tang Chen wrote: Hi Glauber, all, An old thing I want to discuss with you. :) On 01/09/2013 11:09 PM, Glauber Costa wrote: memory can't be offlined when CONFIG_MEMCG is selected. For example: there is a memory d

Re: [PATCH 3/3] acpi, memory-hotplug: Support getting hotplug info from SRAT.

2013-02-06 Thread Tang Chen
On 02/07/2013 05:54 AM, Andrew Morton wrote: On Wed, 06 Feb 2013 10:20:57 +0800 Tang Chen wrote: + if (!strncmp(p, "acpi", max(4, strlen(p + movablemem_map.acpi = true; Generates a warning: mm/page_alloc.c: In function 'cmdline_parse_mova

Re: [PATCH v5 01/14] memory-hotplug: try to offline the memory twice to avoid dependence

2013-02-06 Thread Tang Chen
On 02/06/2013 10:24 PM, Glauber Costa wrote: And one more question, a memory section is 128MB in Linux. If we reserve part of the them for page_cgroup, then anyone who wants to allocate a contiguous memory larger than 128MB, it will fail, right ? Is it OK ? No, it is not. Another take on this:

[PATCH 01/11] x86: get pg_data_t's memory from other node

2013-04-05 Thread Tang Chen
fails. Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Lai Jiangshan Signed-off-by: Tang Chen Signed-off-by: Jiang Liu --- arch/x86/mm/numa.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 11acdf6..4f754e6 100644 --- a/arch/x

[PATCH 02/11] acpi: Print hotplug info in SRAT.

2013-04-05 Thread Tang Chen
The Hot Pluggable field in SRAT points out if the memory could be hotplugged while the system is running. It is useful to print out this info when parsing SRAT. Signed-off-by: Tang Chen --- arch/x86/mm/srat.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH 09/11] x86, numa, acpi, memory-hotplug: Sanitize zone_movable_limit[].

2013-04-05 Thread Tang Chen
that sanitize_zone_movable_limit() could use it. This is pointed out by Wu Jianguo . Reported-by: Wu Jianguo Signed-off-by: Tang Chen Signed-off-by: Liu Jiang Reviewed-by: Wen Congyang Reviewed-by: Lai Jiangshan Tested-by: Lin Feng --- mm/page_alloc.c | 54

[PATCH 10/11] x86, numa, acpi, memory-hotplug: make movablemem_map have higher priority

2013-04-05 Thread Tang Chen
If kernelcore or movablecore is specified at the same time with movablemem_map, movablemem_map will have higher priority to be satisfied. This patch will make find_zone_movable_pfns_for_nodes() calculate zone_movable_pfn[] with the limit from zone_movable_limit[]. Signed-off-by: Tang Chen

[PATCH 00/11] Introduce movablemem_map=acpi boot option.

2013-04-05 Thread Tang Chen
Before this patch-set, we introduced movablemem_map boot option which allowed users to specify physical address ranges to set memory as movable. This is not user friendly enough for normal users. So now, we introduce just movablemem_map=acpi to allow users to enable/disable the kernel to use Hot P

[PATCH 07/11] x86, numa, acpi, memory-hotplug: Make any node which the kernel resides in un-hotpluggable.

2013-04-05 Thread Tang Chen
vable. So we always set the nodes which the kernel resides in as non-movable. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c | 25 +++-- arch/x86/mm/srat.c | 17 - include/linux/mm.h |1 + 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a

[PATCH 08/11] x86, numa, acpi, memory-hotplug: Introduce zone_movable_limit[] to store start pfn of ZONE_MOVABLE.

2013-04-05 Thread Tang Chen
is used to store the start pfn of each node's ZONE_MOVABLE. We update it each time we parsed a SRAT memory entry if necessary. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c | 16 ++-- include/linux/mm.h |2 ++ mm/page_alloc.c|1 + 3 files changed, 17 insertions(

[PATCH 11/11] x86, numa, acpi, memory-hotplug: Memblock limit with movablemem_map

2013-04-05 Thread Tang Chen
memblock_overlaps_region() is not. So add CONFIG_HAVE_MEMBLOCK_NODE_MAP to protect the use of movablecore_map in memblock_overlaps_region(). Signed-off-by: Tang Chen Reviewed-by: Wen Congyang Reviewed-by: Lai Jiangshan Tested-by: Lin Feng Reported-by: Stephen Rothwell --- include/linux/memblock.h |2

[PATCH 04/11] x86, numa, acpi, memory-hotplug: Introduce hotplug info into struct numa_meminfo.

2013-04-05 Thread Tang Chen
numa_add_memblk() - numa_add_memblk_to() And the following callers: - numaq_register_node() - dummy_numa_init() - amd_numa_init() - acpi_numa_memory_affinity_init() in x86 Signed-off-by: Tang Chen --- arch/x86/include/asm/numa.h |3 ++- arch/x86/kernel/apic/numaq_32.c |

[PATCH 05/11] x86, numa, acpi, memory-hotplug: Consider hotplug info when cleanup numa_meminfo.

2013-04-05 Thread Tang Chen
minfo() logic like this: Merge blocks with the same hotpluggable type on the same node, holes between which don't overlap with memory on other nodes. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/x86

[PATCH 06/11] X86, numa, acpi, memory-hotplug: Add hotpluggable ranges to movablemem_map.

2013-04-05 Thread Tang Chen
When parsing SRAT, we are able to know which memory ranges are hotpluggable, and we add them to movablemem_map. So movablemem_map could be used to prevent memblock from allocating memory in area which will be set as ZONE_MOVABLE later. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c | 39

[PATCH 03/11] numa, acpi, memory-hotplug: Add movablemem_map=acpi boot option.

2013-04-05 Thread Tang Chen
. Signed-off-by: Tang Chen Signed-off-by: Lai Jiangshan Reviewed-by: Wen Congyang Tested-by: Lin Feng --- Documentation/kernel-parameters.txt | 11 +++ include/linux/mm.h | 12 mm/page_alloc.c | 35 +++ 3

Re: [PATCH v6 08/15] memory-hotplug: Common APIs to support page tables hot-remove

2013-01-29 Thread Tang Chen
On 01/29/2013 09:04 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: From: Wen Congyang When memory is removed, the corresponding pagetables should alse be removed. This patch introduces some common APIs to support vmemmap pagetable and x86_64 architecture

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-29 Thread Tang Chen
On 01/29/2013 08:52 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: Here is the physical memory hot-remove patch-set based on 3.8rc-2. Hi Simon, I'll summarize all the info and answer you later. :) Thanks for asking. :) Some questions ask you, no

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-29 Thread Tang Chen
On 01/30/2013 10:48 AM, Simon Jeons wrote: On Wed, 2013-01-30 at 10:32 +0800, Tang Chen wrote: On 01/29/2013 08:52 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: Here is the physical memory hot-remove patch-set based on 3.8rc-2. Hi Simon, I&#x

Re: [PATCH v6 08/15] memory-hotplug: Common APIs to support page tables hot-remove

2013-01-29 Thread Tang Chen
On 01/30/2013 11:27 AM, Simon Jeons wrote: On Wed, 2013-01-30 at 10:16 +0800, Tang Chen wrote: On 01/29/2013 09:04 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: From: Wen Congyang When memory is removed, the corresponding pagetables should alse be

[PATCH Bug fix] acpi, movablemem_map: node0 should always be unhotpluggable when using SRAT.

2013-01-29 Thread Tang Chen
n can be used as a workaround of firmware bugs. Reported-by: H. Peter Anvin Signed-off-by: Tang Chen --- Documentation/kernel-parameters.txt |6 ++ arch/x86/mm/srat.c | 10 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Documentation/k

Re: [PATCH Bug fix] acpi, movablemem_map: node0 should always be unhotpluggable when using SRAT.

2013-01-30 Thread Tang Chen
On 01/30/2013 04:50 PM, David Rientjes wrote: On Wed, 30 Jan 2013, Tang Chen wrote: When using movablemem_map=acpi, always set node0 as unhotpluggable, otherwise if all the memory is hotpluggable, the kernel will fail to boot. When using movablemem_map=nn[KMG]@ss[KMG], we don't stop

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-30 Thread Tang Chen
Hi Simon, Please see below. :) On 01/29/2013 08:52 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: Here is the physical memory hot-remove patch-set based on 3.8rc-2. Some questions ask you, not has relationship with this patchset, but is memory hotplug

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-30 Thread Tang Chen
On 01/30/2013 06:15 PM, Tang Chen wrote: Hi Simon, Please see below. :) On 01/29/2013 08:52 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: Here is the physical memory hot-remove patch-set based on 3.8rc-2. Some questions ask you, not has relationship

Re: [PATCH Bug fix] acpi, movablemem_map: node0 should always be unhotpluggable when using SRAT.

2013-01-30 Thread Tang Chen
Hi David, On 01/30/2013 05:45 PM, David Rientjes wrote: On Wed, 30 Jan 2013, Tang Chen wrote: The failure I'm trying to fix is that if all the memory is hotpluggable, and user specified movablemem_map, my code will set all the memory as ZONE_MOVABLE, and kernel will fail to allocat

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-30 Thread Tang Chen
Hi Simon, Please see below. :) On 01/31/2013 09:22 AM, Simon Jeons wrote: Sorry, I still confuse. :( update node_states[N_NORMAL_MEMORY] to node_states[N_MEMORY] or node_states[N_NORMAL_MEMOR] present 0...ZONE_MOVABLE? node_states is what? node_states[N_NORMAL_MEMOR] or node_states[N_MEMORY]?

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-30 Thread Tang Chen
On 01/31/2013 02:19 PM, Simon Jeons wrote: Hi Tang, On Thu, 2013-01-31 at 11:31 +0800, Tang Chen wrote: Hi Simon, Please see below. :) On 01/31/2013 09:22 AM, Simon Jeons wrote: Sorry, I still confuse. :( update node_states[N_NORMAL_MEMORY] to node_states[N_MEMORY] or node_states

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-31 Thread Tang Chen
Hi Simon, On 01/31/2013 04:48 PM, Simon Jeons wrote: Hi Tang, On Thu, 2013-01-31 at 15:10 +0800, Tang Chen wrote: 1. IIUC, there is a button on machine which supports hot-remove memory, then what's the difference between press button and echo to /sys? No important difference, I think.

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-31 Thread Tang Chen
On 02/01/2013 09:36 AM, Simon Jeons wrote: On Fri, 2013-02-01 at 09:32 +0800, Jianguo Wu wrote: So if config NUMA, kernel memory will not be linear mapping anymore? For example, Node 0 Node 1 0 ~ 10G 11G~14G It has nothing to do with linear mapping, I think. kernel memory only at Node 0

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-31 Thread Tang Chen
Hi Simon, On 02/01/2013 10:17 AM, Simon Jeons wrote: For example: 64TB, what ever xxxTB, what ever logic address space: |_kernel___|_user_| \ \ / /

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-31 Thread Tang Chen
Hi Simon, On 02/01/2013 11:06 AM, Simon Jeons wrote: How can distinguish map and use? I mean how can confirm memory is used by kernel instead of map? If the page is free, for example, it is in the buddy system, it is not in use. Even if it is direct mapped by kernel, the kernel logic should

[PATCH 1/2] cpu_hotplug: Remove __cpuinitdata declaration of __apicid_to_node[].

2013-01-24 Thread Tang Chen
__apicid_to_node[] will be used by acpi_unmap_lsapic() when we do node hotplug. So it is no longer an init data. Do not declare __apicid_to_node[] as a __cpuinitdata, otherwise it will cause section mismatch warning when compiling. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c |2 +- 1

[PATCH 2/2] cpu-hotplug,memory-hotplug: Remove __cpuinit declaration of numa_clear_node().

2013-01-24 Thread Tang Chen
numa_clear_node() will be used by check_and_unmap_cpu_on_node() when we do node hotplug. So it is no longer a __cpuinit function. Do not declare it as a __cpuinit function, otherwise it will cause section mismatch warning when compiling. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c |2

[PATCH 0/2] Fix section mismatch caused by node offline code.

2013-01-24 Thread Tang Chen
Since node offline code uses __apicid_to_node[] and numa_clear_node(), they are no longer init data or function. So do not declare them as __cpuinitdata or __cpuinit. Tang Chen (2): cpu_hotplug: Remove __cpuinitdata declaration of __apicid_to_node[]. cpu-hotplug,memory-hotplug: Remove

[PATCH 2/3] acpi, memory-hotplug: Extend movablemem_map ranges to the end of node.

2013-01-25 Thread Tang Chen
ing memory * on ZONE_MOVABLE at boot time. * * NOTE: In this case, SRAT info will be ingored. */ Signed-off-by: Tang Chen --- arch/x86/mm/srat.c | 61 +-- include/linux/mm.h |5 mm/page_alloc.c

[PATCH 3/3] acpi, memory-hotplug: Support getting hotplug info from SRAT.

2013-01-25 Thread Tang Chen
If users don't want to lose NUMA performance, just don't use it. Signed-off-by: Tang Chen --- Documentation/kernel-parameters.txt | 23 ++- arch/x86/mm/srat.c | 22 +- include/linux/mm.h |1 +

[PATCH 0/3] Support SRAT for movablemem_map boot option.

2013-01-25 Thread Tang Chen
s who don't want to lose NUMA performance, just do not use it now. We will improve it all along. For more info of movablemem_map, please refer to: https://lkml.org/lkml/2013/1/14/87 Tang Chen (3): acpi, memory-hotplug: Parse SRAT before memblock is ready. acpi, memory-hotpl

[PATCH 1/3] acpi, memory-hotplug: Parse SRAT before memblock is ready.

2013-01-25 Thread Tang Chen
count and use it as the return value of the new acpi_numa_init() Signed-off-by: Tang Chen --- arch/x86/kernel/setup.c | 13 + arch/x86/mm/numa.c |2 +- drivers/acpi/numa.c | 23 +-- include/linux/acpi.h|1 + 4 files changed, 24 inse

Re: [PATCH Bug fix 0/5] Bug fix for physical memory hot-remove.

2013-01-27 Thread Tang Chen
On 01/26/2013 02:19 AM, Toshi Kani wrote: On Tue, 2013-01-22 at 19:42 +0800, Tang Chen wrote: Here are some bug fix patches for physical memory hot-remove. All these patches are based on the latest -mm tree. git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm And patch1 and

Re: [PATCH 2/3] acpi, memory-hotplug: Extend movablemem_map ranges to the end of node.

2013-01-27 Thread Tang Chen
the-end-of-node-fix clean up code, fix build warning Cc: "Brown, Len" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jiang Liu Cc: Jianguo Wu Cc: KOSAKI Motohiro Cc: Kamezawa Hiroyuki Cc: Lai Jiangshan Cc: Len Brown Cc: Tang Chen Cc: Thomas Gleixner Cc: Wu J

Re: [PATCH Bug fix 0/5] Bug fix for physical memory hot-remove.

2013-01-27 Thread Tang Chen
On 01/25/2013 09:17 PM, Michal Hocko wrote: On Wed 23-01-13 06:29:31, Simon Jeons wrote: On Tue, 2013-01-22 at 19:42 +0800, Tang Chen wrote: Here are some bug fix patches for physical memory hot-remove. All these patches are based on the latest -mm tree. git://git.kernel.org/pub/scm/linux

Re: [PATCH 3/3] acpi, memory-hotplug: Support getting hotplug info from SRAT.

2013-01-27 Thread Tang Chen
On 01/26/2013 09:29 AM, H. Peter Anvin wrote: On 01/25/2013 05:12 PM, Andrew Morton wrote: On Fri, 25 Jan 2013 17:42:09 +0800 Tang Chen wrote: NOTE: Using this way will cause NUMA performance down because the whole node will be set as ZONE_MOVABLE, and kernel cannot use memory on it

Re: [PATCH 3/3] acpi, memory-hotplug: Support getting hotplug info from SRAT.

2013-01-28 Thread Tang Chen
On 01/26/2013 09:12 AM, Andrew Morton wrote: On Fri, 25 Jan 2013 17:42:09 +0800 Tang Chen wrote: NOTE: Using this way will cause NUMA performance down because the whole node will be set as ZONE_MOVABLE, and kernel cannot use memory on it. If users don't want to lose

Re: [Bug fix PATCH 2/2] acpi, movablemem_map: Make whatever nodes the kernel resides in un-hotpluggable.

2013-02-24 Thread Tang Chen
On 02/24/2013 03:26 AM, Rob Landley wrote: On 02/20/2013 05:00:56 AM, Tang Chen wrote: There could be several memory ranges in the node in which the kernel resides. When using movablemem_map=acpi, we may skip one range that have memory reserved by memblock. But if it is too small, then the

Re: sched: CPU #1's llc-sibling CPU #0 is not on the same node!

2013-02-25 Thread Tang Chen
[0.170435] [ cut here ] [0.170450] WARNING: at arch/x86/kernel/smpboot.c:324 topology_sane.isra.2+0x71/0x84() [0.170452] Hardware name: S2600CP [0.170454] sched: CPU #1's llc-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency. [

Re: sched: CPU #1's llc-sibling CPU #0 is not on the same node!

2013-02-25 Thread Tang Chen
On 02/26/2013 12:51 PM, Martin Bligh wrote: Do you mean we can remove numaq x86 32bit code now? Wouldn't bother me at all. The machine is from 1995, end of life c. 2000? Was useful in the early days of getting NUMA up and running on Linux, but is now too old to be a museum piece, really. M.

Re: sched: CPU #1's llc-sibling CPU #0 is not on the same node!

2013-02-25 Thread Tang Chen
On 02/26/2013 02:57 PM, Yinghai Lu wrote: That is temporary workaround and your patch and this workaround make x86 acpi numa init too messy. I don't see the point to hack SRAT to make memory hotplug working. Do you guys check and use PMTT in ACPI spec instead? Hi Yinghai, Thanks for the sugg

Re: sched: CPU #1's llc-sibling CPU #0 is not on the same node!

2013-02-26 Thread Tang Chen
Hi Yinghai, Please see below. :) On 02/27/2013 06:44 AM, Yinghai Lu wrote: that commit is totally broken, and it should be reverted. 1. numa_init is called several times, NOT just for srat. so those nodes_clear(numa_nodes_parsed) memset(&numa_meminfo, 0, sizeof(numa_meminfo)) can not b

Re: sched: CPU #1's llc-sibling CPU #0 is not on the same node!

2013-02-26 Thread Tang Chen
On 02/27/2013 10:24 AM, Yinghai Lu wrote: After looked at the code more, thought that theory that does not let kernel use ram on hotplug area is not right. after that commit, following range can not use movable ram: 1. real_mode code well..funny, legacy cpu0 [0,1M) could be hot-removed? 2. d

Re: sched: CPU #1's llc-sibling CPU #0 is not on the same node!

2013-02-26 Thread Tang Chen
On 02/27/2013 02:54 PM, Yinghai Lu wrote: On Tue, Feb 26, 2013 at 9:49 PM, Yasuaki Ishimatsu wrote: 2013/02/27 14:11, Yinghai Lu wrote: On Tue, Feb 26, 2013 at 8:43 PM, Yasuaki Ishimatsu wrote: 2013/02/27 13:04, Yinghai Lu wrote: On Tue, Feb 26, 2013 at 7:38 PM, Yasuaki Ishimatsu wr

Re: sched: CPU #1's llc-sibling CPU #0 is not on the same node!

2013-02-26 Thread Tang Chen
On 02/27/2013 03:25 PM, Yinghai Lu wrote: On Tue, Feb 26, 2013 at 11:11 PM, Tang Chen wrote: On 02/27/2013 02:54 PM, Yinghai Lu wrote: Those patches are tangled together. No, they are not. The following commits supports "movablemem_map=nn[KMG]@ss[KMG]"

[PATCH] x86, ACPI, mm: Revert SRAT support from movablemem_map boot option.

2013-02-28 Thread Tang Chen
Reported-by: Don Morris Bisected-by: Don Morris Reported-by: Yinghai Lu Signed-off-by: Tang Chen Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Andrew Morton Cc: Tony Luck Cc: Thomas Renninger Cc: Tejun Heo Cc: Tang Chen Cc: Yasuaki Ishimatsu --- Documentation/k

Re: sched: CPU #1's llc-sibling CPU #0 is not on the same node!

2013-02-28 Thread Tang Chen
Hi Andrew, On 02/28/2013 05:26 AM, Andrew Morton wrote: Thank you all for addressing the bug. we are on the way to fix it. How long do you think this will take? I think we need one week to solve these problems. I do hope we can catch up the merge window for 3.9. Thanks. :) -- To un

Re: [bug]patch "acpi, memory-hotplug: parse SRAT before memblock is ready" breaks numa detection

2013-02-18 Thread Tang Chen
On 02/19/2013 11:07 AM, Shaohua Li wrote: This patch in linux-next breaks numa detection. numa_init() will zero numa_meminfo. If acpi_numa_init() does not call early_parse_srat(), we will have no memory numa info. Hum, yes, I missed this one. :) Briefly seeing the code, I think moving the fol

[Bug fix PATCH 2/2] acpi, movablemem_map: Set numa_nodes_hotplug nodemask when using SRAT info.

2013-02-19 Thread Tang Chen
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 --- 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

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

2013-02-19 Thread Tang Chen
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 --- arch/x86/mm/numa.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a

[Bug fix PATCH 0/2] Bug fix for movablemem_map boot option.

2013-02-19 Thread Tang Chen
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

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

2013-02-19 Thread Tang Chen
Sorry, add cc Li Shaohua. Reported-by: Li Shaohua 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

[Bug fix PATCH 1/2] acpi, movablemem_map: Exclude memblock.reserved ranges when parsing SRAT.

2013-02-20 Thread Tang Chen
gable, there will always be memory that could be used by the kernel. Reported-by: H Peter Anvin Signed-off-by: Tang Chen --- arch/x86/mm/srat.c | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 62ba97b..b8028b2 1

[Bug fix PATCH 2/2] acpi, movablemem_map: Make whatever nodes the kernel resides in un-hotpluggable.

2013-02-20 Thread Tang Chen
. Then the kernel has enough memory to use. Reported-by: H Peter Anvin Signed-off-by: Tang Chen --- Documentation/kernel-parameters.txt |6 ++ arch/x86/mm/srat.c | 17 + include/linux/mm.h |1 + 3 files changed, 24 insertions(+), 0

[Bug fix PATCH 0/2] Make whatever node kernel resides in un-hotpluggable.

2013-02-20 Thread Tang Chen
the same node into movablemenm_map.map[], so that make the node which the kernel resides in un-hotpluggable. Tang Chen (2): acpi, movablemem_map: Exclude memblock.reserved ranges when parsing SRAT. acpi, movablemem_map: Make whatever nodes the kernel resides in un-hotpluggable

Re: [Bug fix PATCH 1/2] acpi, movablemem_map: Exclude memblock.reserved ranges when parsing SRAT.

2013-02-20 Thread Tang Chen
On 02/20/2013 07:00 PM, Tang Chen wrote: As mentioned by HPA before, when we are using movablemem_map=acpi, if all the memory ranges in SRAT is hotpluggable, then no memory can be used by kernel. Before parsing SRAT, memblock has already reserve some memory ranges for other purposes, such as

Re: [Bug fix PATCH 0/2] Make whatever node kernel resides in un-hotpluggable.

2013-02-20 Thread Tang Chen
On 02/21/2013 05:36 AM, Andrew Morton wrote: On Wed, 20 Feb 2013 19:00:54 +0800 Tang Chen wrote: As mentioned by HPA before, when we are using movablemem_map=acpi, if all the memory in SRAT is hotpluggable, then the kernel will have no memory to use, and will fail to boot. Before parsing

Re: [Bug fix PATCH 0/2] Make whatever node kernel resides in un-hotpluggable.

2013-02-20 Thread Tang Chen
Hi Andrew, Please see below. :) On 02/21/2013 05:36 AM, Andrew Morton wrote: Also, please review the changelogging for these: page_alloc-add-movable_memmap-kernel-parameter.patch page_alloc-add-movable_memmap-kernel-parameter-fix.patch page_alloc-add-movable_memmap-kernel-parameter-fix-fix.pa

[PATCH v1 5/9] x86, mm, numa, acpi: Extend movablemem_map to the end of each node.

2013-03-16 Thread Tang Chen
ing memory * on ZONE_MOVABLE at boot time. * * NOTE: In this case, SRAT info will be ingored. */ Signed-off-by: Tang Chen --- arch/x86/mm/srat.c | 34 ++ 1 files changed, 30 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/sra

[PATCH v1 7/9] x86, mm, numa, acpi: Sanitize zone_movable_limit[].

2013-03-16 Thread Tang Chen
that sanitize_zone_movable_limit() could use it. This is pointed out by Wu Jianguo . Reported-by: Wu Jianguo Signed-off-by: Tang Chen Signed-off-by: Liu Jiang Reviewed-by: Wen Congyang Reviewed-by: Lai Jiangshan Tested-by: Lin Feng --- mm/page_alloc.c | 55

[PATCH v1 6/9] x86, mm, numa, acpi: Support getting hotplug info from SRAT.

2013-03-16 Thread Tang Chen
If users don't want to lose NUMA performance, just don't use it. Signed-off-by: Tang Chen --- Documentation/kernel-parameters.txt | 15 +++ arch/x86/mm/srat.c | 74 +-- include/linux/mm.h |2 +

[PATCH v1 8/9] x86, mm, numa, acpi: make movablemem_map have higher priority

2013-03-16 Thread Tang Chen
If kernelcore or movablecore is specified at the same time with movablemem_map, movablemem_map will have higher priority to be satisfied. This patch will make find_zone_movable_pfns_for_nodes() calculate zone_movable_pfn[] with the limit from zone_movable_limit[]. Signed-off-by: Tang Chen

[PATCH v1 part1 0/9] Introduce movablemem_map boot option.

2013-03-16 Thread Tang Chen
for users who don't want to lose their NUMA performance, just don't use it. 2) If kernelcore or movablecore is also specified, movablecore_map will have higher priority to be satisfied. 3) This option has no conflict with memmap option. Tang Chen (8): acpi: Print hotplug info in

[PATCH v1 4/9] x86, mm, numa, acpi: Introduce zone_movable_limit[] to store start pfn of ZONE_MOVABLE.

2013-03-16 Thread Tang Chen
is used to store the start pfn of each node's ZONE_MOVABLE. We update it each time we parsed a SRAT memory entry if necessary. Signed-off-by: Tang Chen --- arch/x86/mm/srat.c | 29 + include/linux/mm.h |9 + mm/page_alloc.c|

[PATCH v1 1/9] x86: get pg_data_t's memory from other node

2013-03-16 Thread Tang Chen
fails. Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Lai Jiangshan Signed-off-by: Tang Chen Signed-off-by: Jiang Liu --- arch/x86/mm/numa.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 11acdf6..4f754e6 100644 --- a/arch/x

[PATCH v1 9/9] x86, mm, numa, acpi: Memblock limit with movablemem_map

2013-03-16 Thread Tang Chen
memblock_overlaps_region() is not. So add CONFIG_HAVE_MEMBLOCK_NODE_MAP to protect the use of movablecore_map in memblock_overlaps_region(). Signed-off-by: Tang Chen Reviewed-by: Wen Congyang Reviewed-by: Lai Jiangshan Tested-by: Lin Feng Reported-by: Stephen Rothwell --- include/linux/memblock.h |2

[PATCH v1 2/9] acpi: Print hotplug info in SRAT.

2013-03-16 Thread Tang Chen
The Hot Pluggable field in SRAT points out if the memory could be hotplugged while the system is running. It is useful to print out this info when parsing SRAT. Signed-off-by: Tang Chen --- arch/x86/mm/srat.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch

  1   2   3   4   5   6   7   8   9   10   >