[PATCH v3 12/13] x86, numa, acpi, memory-hotplug: Make movablecore=acpi have higher priority.

2013-05-24 Thread Tang Chen
rs specify "movablecore=acpi" in kernel commandline, the kernel will use SRAT to arrange ZONE_MOVABLE, and it has higher priority then original movablecore and kernelcore boot option. For those who don't want this, just specify nothing. Signed-off-by: Tang Chen --- include/linux/memblock.

[PATCH v3 03/13] page_alloc, mem-hotplug: Improve movablecore to {en|dis}able using SRAT.

2013-05-24 Thread Tang Chen
t to lose their NUMA performance, just don't specify anything. The kernel will work as before. Suggested-by: Kamezawa Hiroyuki Signed-off-by: Tang Chen --- include/linux/memory_hotplug.h |3 +++ mm/page_alloc.c| 13 + 2 files changed, 16 insertions(+), 0 d

[PATCH v3 11/13] x86, memblock, mem-hotplug: Free hotpluggable memory reserved by memblock.

2013-05-24 Thread Tang Chen
We reserved hotpluggable memory in memblock. And when memory initialization is done, we have to free it to buddy system. This patch free memory reserved by memblock with flag MEMBLK_HOTPLUGGABLE. Signed-off-by: Tang Chen --- include/linux/memblock.h |1 + mm/memblock.c| 20

[PATCH v3 06/13] memblock, numa: Introduce flag into memblock.

2013-05-24 Thread Tang Chen
sted-by: Wen Congyang Suggested-by: Liu Jiang Signed-off-by: Tang Chen --- include/linux/memblock.h |8 ++ mm/memblock.c| 56 + 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/include/linux/memblock.h b/inc

[PATCH v3 10/13] x86, acpi, numa, mem-hotplug: Introduce MEMBLK_HOTPLUGGABLE to mark and reserve hotpluggable memory.

2013-05-24 Thread Tang Chen
freed to buddy when memory initialization is done. And also, ensure all the nodes which the kernel resides in are un-hotpluggable. This idea is from Wen Congyang and Jiang Liu . Suggested-by: Jiang Liu Suggested-by: Wen Congyang Signed-off-by: Tang Chen Reviewed-by: Vasilis Liaskovitis

[PATCH v3 09/13] x86, numa, memblock: Introduce MEMBLK_LOCAL_NODE to mark and reserve node-life-cycle data.

2013-05-24 Thread Tang Chen
mapping pagetable pages, based on Yinghai's patch. Signed-off-by: Tang Chen --- arch/x86/mm/init.c | 16 include/linux/memblock.h |2 ++ mm/memblock.c|7 +++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/init.c b

Re: [PATCH] Driver core / memory: Simplify __memory_block_change_state()

2013-05-22 Thread Tang Chen
Reviewed-by: Tang Chen Thanks. :) On 05/23/2013 06:06 AM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki As noted by Tang Chen, the last_online field in struct memory_block introduced by commit 4960e05 (Driver core: Introduce offline/online callbacks for memory blocks) is not really

Re: [PATCH v2 01/13] x86: get pg_data_t's memory from other node

2013-05-22 Thread Tang Chen
On 05/22/2013 04:55 PM, Chen Gong wrote: .. - nd_pa = memblock_alloc_nid(nd_size, SMP_CACHE_BYTES, nid); + nd_pa = memblock_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); go through the implementation of memblock_alloc_try_nid, it will call panic when allocation fails(a.k.a alloc

Re: [PATCH v4 00/22] x86, ACPI, numa: Parse numa info early

2013-05-21 Thread Tang Chen
now. But I didn't find this patch-set merged into tip/x86/mm. was it merged to somewhere else, or we have any other plan to push ? By the way, I have done some tests for this patch-set, and the test results have been sent. Please refer to: https://lkml.org/lkml/2013/4/30/45 Reviewed-by: Tang

Re: [PATCH 2/2 v2, RFC] Driver core: Introduce offline/online callbacks for memory blocks

2013-05-21 Thread Tang Chen
ck_change_state() in memory_subsys_online()? -1? If you want to keep the last time status, you can pass ONLINE_KEEP. Or -1 is all right. Thanks. :) Reviewed-by: Tang Chen Thanks. :) Thanks for your comments, Rafael -- To unsubscribe from this list: send the line "unsubsc

Re: [PATCH v2 12/13] x86, numa, acpi, memory-hotplug: Make movablecore=acpi have higher priority.

2013-05-21 Thread Tang Chen
Hi Vasilis, Maybe the following two problems are the cause of the reboot panic problem in qemu you mentioned. On 04/30/2013 05:21 PM, Tang Chen wrote: .. diff --git a/mm/page_alloc.c b/mm/page_alloc.c index b9ea143..2fe9ebf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4793,9

Re: [PATCH 1/1] numa, mm, memory-hotplug: Do not allocate pagetable to local node with MEMORY_HOTREMOVE enabled.

2013-05-21 Thread Tang Chen
Hi On 05/21/2013 03:02 PM, Pekka Enberg wrote: .. Ugh. Special-casing for CONFIG_MEMORY_HOTPLUG is just begging for trouble. Were you able to determine which commit broke memory hot-remove? Please refer to the following patch-set. https://lkml.org/lkml/2013/4/11/829 patch21 and patch22 w

Re: [PATCH 1/2 v2, RFC] ACPI / memhotplug: Bind removable memory blocks to ACPI device nodes

2013-05-20 Thread Tang Chen
Hi Rafael, Seems OK to me. Reviewed-by: Tang Chen Thanks. :) On 05/04/2013 07:12 PM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki During ACPI memory hotplug configuration bind memory blocks residing in modules removable through the standard ACPI mechanism to struct acpi_device objects

Re: [PATCH 2/2 v2, RFC] Driver core: Introduce offline/online callbacks for memory blocks

2013-05-20 Thread Tang Chen
fn_to_page(pfn)); /* Here, the page will be put into the zone which it belong to last time. */ .. } I just thought of it. Maybe I missed something in your design. Please tell me if I'm wrong. Reviewed-by: Tang Chen Thanks. :) -- To unsubscribe from this list: send the line

Re: [WiP]: aio support for migrating pages (Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable())

2013-05-20 Thread Tang Chen
Hi Benjamin, Sorry for the late. Please see below. On 05/17/2013 10:37 PM, Benjamin LaHaise wrote: On Fri, May 17, 2013 at 11:28:52AM +0800, Tang Chen wrote: Hi Benjamin, Thank you very much for your idea. :) I have no objection to your idea, but seeing from your patch, this only works for

Re: [WiP]: aio support for migrating pages (Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable())

2013-05-16 Thread Tang Chen
migration. I think I'll send a RFC patch next week when I finished the outline. I'm just thinking of finding a common way to solve this problem that all the other subsystems will benefit. Thanks. :) On 05/17/2013 08:23 AM, Benjamin LaHaise wrote: On Thu, May 16, 2013 at 01:54:18PM +

[PATCH 1/1] numa, mm, memory-hotplug: Do not allocate pagetable to local node with MEMORY_HOTREMOVE enabled.

2013-05-16 Thread Tang Chen
pagetables to local node when CONFIG_MEMORY_HOTREMOVE is enabled. And recover it when we confirm the direction and fix the problem. This patch is based on git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-x86-mm Any other solution for this problem is welcome. Signed-off-b

Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable()

2013-05-15 Thread Tang Chen
Hi Mel, On 05/15/2013 09:24 PM, Mel Gorman wrote: If it is to be an address space operations sturcture then you'll need a pseudo mapping structure for anonymous pages that are pinned by aio -- similar in principal to how swapper_space is used for managing PageSwapCache or how anon_vma structures

Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable()

2013-05-15 Thread Tang Chen
Hi Benjamin, Mel, On 05/15/2013 10:09 AM, Tang Chen wrote: Hi Benjamin, Mel, Please see below. On 05/14/2013 09:58 PM, Benjamin LaHaise wrote: On Tue, May 14, 2013 at 09:24:58AM +0800, Tang Chen wrote: Hi Mel, Benjamin, Jeff, On 05/13/2013 11:01 PM, Benjamin LaHaise wrote: On Mon, May 13

Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable()

2013-05-14 Thread Tang Chen
Hi Benjamin, Mel, Please see below. On 05/14/2013 09:58 PM, Benjamin LaHaise wrote: On Tue, May 14, 2013 at 09:24:58AM +0800, Tang Chen wrote: Hi Mel, Benjamin, Jeff, On 05/13/2013 11:01 PM, Benjamin LaHaise wrote: On Mon, May 13, 2013 at 10:54:03AM -0400, Jeff Moyer wrote: How do you

Re: [PATCH v4 00/22] x86, ACPI, numa: Parse numa info early

2013-05-14 Thread Tang Chen
Hi Yinghai, How do you think of the following problem and solutions ? And can we not allocate pagetable to local node when MEMORY_HOTREMOVE is enabled for now, and do it again when the problem in hot-remove path is fixed ? Thanks. :) On 05/13/2013 10:59 AM, Tang Chen wrote: Hi Yinghai, On

Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable()

2013-05-13 Thread Tang Chen
Hi Mel, On 05/13/2013 05:19 PM, Mel Gorman wrote: For memory hot-remove case, the aio pages are pined in memory and making the pages cannot be offlined, furthermore, the pages cannot be removed. IIUC, you mean implement migrate_unpin() and migrate_pin() callbacks in aio subsystem, and call them

Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable()

2013-05-13 Thread Tang Chen
Hi Mel, Benjamin, Jeff, On 05/13/2013 11:01 PM, Benjamin LaHaise wrote: On Mon, May 13, 2013 at 10:54:03AM -0400, Jeff Moyer wrote: How do you propose to move the ring pages? It's the same problem as doing a TLB shootdown: flush the old pages from userspace's mapping, copy any existing data t

Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable()

2013-05-13 Thread Tang Chen
Hi Mel, On 02/06/2013 05:56 PM, Mel Gorman wrote: There is the possibility that callbacks could be introduced for migrate_unpin() and migrate_pin() that takes a list of PFN pairs (old,new). The unpin callback should release the old PFNs and barrier against any operations until the migrate_pfn()

Re: [PATCH v4 00/22] x86, ACPI, numa: Parse numa info early

2013-05-12 Thread Tang Chen
Hi Yinghai, On 05/10/2013 02:24 AM, Yinghai Lu wrote: So I suggest to separate the job into 2 parts: 1. Push Yinghai's patch1 ~ patch20, without putting pagetable in local node. And push my work to use SRAT to arrange ZONE_MOVABLE. In this case, we can enable memory hotplug in the kernel first.

Re: [PATCH v4 00/22] x86, ACPI, numa: Parse numa info early

2013-05-09 Thread Tang Chen
Hi Yinghai, On 04/30/2013 03:21 PM, Tang Chen wrote: So I suggest to separate the job into 2 parts: 1. Push Yinghai's patch1 ~ patch20, without putting pagetable in local node. And push my work to use SRAT to arrange ZONE_MOVABLE. In this case, we can enable memory hotplug in the kernel

Re: [RFC/PATCH 3/5] mm: get_user_pages: use NON-MOVABLE pages when FOLL_DURABLE flag is set

2013-05-07 Thread Tang Chen
Hi Marek, On 05/07/2013 06:47 PM, Marek Szyprowski wrote: I don't think that there was any conclusion after my patch, so I really see no point in submitting it again now. If you need it for Your patchset, You can include it directly. Just please keep my signed-off-by tag. That's very kind of

Re: [PATCH v2 10/13] x86, acpi, numa, mem-hotplug: Introduce MEMBLK_HOTPLUGGABLE to mark and reserve hotpluggable memory.

2013-05-06 Thread Tang Chen
Hi Vasilis, On 05/06/2013 06:37 PM, Vasilis Liaskovitis wrote: you can use qemu-kvm and seabios from these branches: https://github.com/vliaskov/qemu-kvm/commits/memhp-v4 https://github.com/vliaskov/seabios/commits/memhp-v4 Instructions on how to use the DIMM/memory hotplug are here: http://l

Re: [PATCH v4 00/22] x86, ACPI, numa: Parse numa info early

2013-05-06 Thread Tang Chen
Hi all, Could anyone give some suggestions to this patch-set ? Thanks. On 04/30/2013 03:21 PM, Tang Chen wrote: Hi Yinghai, all, I've tested this patch-set with my following patch-set: [PATCH v1 00/12] Arrange hotpluggable memory in SRAT as ZONE_MOVABLE. https://lkml.org/lkml/2013/4/

Re: [RFC/PATCH 3/5] mm: get_user_pages: use NON-MOVABLE pages when FOLL_DURABLE flag is set

2013-05-06 Thread Tang Chen
Hi Marek, It has been a long time since this patch-set was sent. And I'm pushing memory hot-remove works. I think I need your [patch3/5] to fix a problem I met. We have sent a similar patch before. But I think yours may be better. :) https://lkml.org/lkml/2013/2/21/126 So would you please updat

Re: [PATCH v2 10/13] x86, acpi, numa, mem-hotplug: Introduce MEMBLK_HOTPLUGGABLE to mark and reserve hotpluggable memory.

2013-05-05 Thread Tang Chen
Hi Vasilis, Sorry for the delay and thank you for reviewing and testing. :) On 05/03/2013 06:50 PM, Vasilis Liaskovitis wrote: Should we skip ranges on nodes that the kernel uses? e.g. with if (memblock_is_kernel_node(nid)) continue; Yes. I think I forgot to call it in

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

2013-04-30 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 v2 02/13] acpi: Print Hot-Pluggable Field in SRAT.

2013-04-30 Thread Tang Chen
The Hot-Pluggable field in SRAT suggests if the memory could be hotplugged while the system is running. Print it as well when parsing SRAT will help users to know which memory is hotpluggable. Signed-off-by: Tang Chen --- arch/x86/mm/srat.c |9 ++--- 1 files changed, 6 insertions(+), 3

[PATCH v2 03/13] page_alloc, mem-hotplug: Improve movablecore to {en|dis}able using SRAT.

2013-04-30 Thread Tang Chen
t to lose their NUMA performance, just don't specify anything. The kernel will work as before. Suggested-by: Kamezawa Hiroyuki Signed-off-by: Tang Chen --- include/linux/memory_hotplug.h |3 +++ mm/page_alloc.c| 13 + 2 files changed, 16 insertions(+), 0 d

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

2013-04-30 Thread Tang Chen
s the following APIs' prototypes to support it: - 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

[PATCH v2 06/13] memblock, numa: Introduce flag into memblock.

2013-04-30 Thread Tang Chen
sted-by: Wen Congyang Suggested-by: Liu Jiang Signed-off-by: Tang Chen --- include/linux/memblock.h |8 ++ mm/memblock.c| 56 + 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/include/linux/memblock.h b/inc

[PATCH v2 13/13] doc, page_alloc, acpi, mem-hotplug: Add doc for movablecore=acpi boot option.

2013-04-30 Thread Tang Chen
Since we modify movablecore boot option to support "movablecore=acpi", this patch adds doc for it. Signed-off-by: Tang Chen --- Documentation/kernel-parameters.txt |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/Documentation/kernel-paramet

[PATCH v2 07/13] x86, numa, mem-hotplug: Mark nodes which the kernel resides in.

2013-04-30 Thread Tang Chen
e, we arrange them as un-hotpluggable. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c |6 ++ include/linux/memblock.h |1 + mm/memblock.c| 20 3 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/n

[PATCH v2 00/13] Arrange hotpluggable memory in SRAT as ZONE_MOVABLE.

2013-04-30 Thread Tang Chen
kml/2013/3/7/642 v2: https://lkml.org/lkml/2013/3/10/47 v3: https://lkml.org/lkml/2013/4/4/639 v4: https://lkml.org/lkml/2013/4/11/829 And Yinghai's patch did the following things: 1) Parse SRAT early enough. 2)Allocate pagetable pages in local node. Tang Chen (12): acpi: Print Hot-Pluggabl

[PATCH v2 11/13] x86, memblock, mem-hotplug: Free hotpluggable memory reserved by memblock.

2013-04-30 Thread Tang Chen
We reserved hotpluggable memory in memblock. And when memory initialization is done, we have to free it to buddy system. This patch free memory reserved by memblock with flag MEMBLK_HOTPLUGGABLE. Signed-off-by: Tang Chen --- include/linux/memblock.h |1 + mm/memblock.c| 20

[PATCH v2 09/13] x86, numa, memblock: Introduce MEMBLK_LOCAL_NODE to mark and reserve node-life-cycle data.

2013-04-30 Thread Tang Chen
mapping pagetable pages, based on Yinghai's patch. Signed-off-by: Tang Chen --- arch/x86/mm/init.c | 16 include/linux/memblock.h |2 ++ mm/memblock.c|7 +++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/init.c b

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

2013-04-30 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 v2 12/13] x86, numa, acpi, memory-hotplug: Make movablecore=acpi have higher priority.

2013-04-30 Thread Tang Chen
rs specify "movablecore=acpi" in kernel commandline, the kernel will use SRAT to arrange ZONE_MOVABLE, and it has higher priority then original movablecore and kernelcore boot option. For those who don't want this, just specify nothing. Signed-off-by: Tang Chen --- include/linux/memblock.

[PATCH v2 10/13] x86, acpi, numa, mem-hotplug: Introduce MEMBLK_HOTPLUGGABLE to mark and reserve hotpluggable memory.

2013-04-30 Thread Tang Chen
freed to buddy when memory initialization is done. This idea is from Wen Congyang and Jiang Liu . Suggested-by: Jiang Liu Suggested-by: Wen Congyang Signed-off-by: Tang Chen --- arch/x86/mm/numa.c | 28 include/linux/memblock.h |3 +++ mm/memblock.c

[PATCH v2 08/13] x86, numa: Move memory_add_physaddr_to_nid() to CONFIG_NUMA.

2013-04-30 Thread Tang Chen
tplug. And also, it can be used by alloc_low_pages() to obtain nid of the allocated memory. So in x86, also use CONFIG_NUMA to protect it. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/n

Re: [PATCH v4 00/22] x86, ACPI, numa: Parse numa info early

2013-04-30 Thread Tang Chen
In this case, we can enable memory hotplug in the kernel first. 2. Merge patch21 and patch22 into the fixing work I am doing now, and push them together when finished. How do you think ? Reviewed-by: Tang Chen Tested-by: Tang Chen Thanks. :) -- To unsubscribe from this list: send the lin

Re: [PATCH v4 00/22] x86, ACPI, numa: Parse numa info early

2013-04-26 Thread Tang Chen
Hi Yinghai, It has been a long time since this patch-set was sent. I think we need to do something to push it. In my understanding, this patch-set did 2 things. 1. Parse numa info earlier, some improvements for ACPI_INITRD_TABLE_OVERRIDE. (patch1 ~ patch20) 2. Allocate pagetable in local n

[PATCH v1 11/12] x86, numa, acpi, memory-hotplug: Make movablecore=acpi have higher priority.

2013-04-19 Thread Tang Chen
rs specify "movablecore=acpi" in kernel commandline, the kernel will use SRAT to arrange ZONE_MOVABLE, and it has higher priority then original movablecore and kernelcore boot option. For those who don't want this, just specify nothing. Signed-off-by: Tang Chen --- include/linux/memblock.

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

2013-04-19 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 v1 03/12] page_alloc, mem-hotplug: Improve movablecore to {en|dis}able using SRAT.

2013-04-19 Thread Tang Chen
t to lose their NUMA performance, just don't specify anything. The kernel will work as before. Suggested-by: Kamezawa Hiroyuki Signed-off-by: Tang Chen --- include/linux/memory_hotplug.h |3 +++ mm/page_alloc.c| 13 + 2 files changed, 16 insertions(+), 0 d

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

2013-04-19 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 06/12] memblock, numa: Introduce flag into memblock.

2013-04-19 Thread Tang Chen
sted-by: Wen Congyang Suggested-by: Liu Jiang Signed-off-by: Tang Chen --- include/linux/memblock.h |8 ++ mm/memblock.c| 56 + 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/include/linux/memblock.h b/inc

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

2013-04-19 Thread Tang Chen
s the following APIs' prototypes to support it: - 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

[PATCH v1 07/12] x86, numa, mem-hotplug: Mark nodes which the kernel resides in.

2013-04-19 Thread Tang Chen
e, we arrange them as un-hotpluggable. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c |6 ++ include/linux/memblock.h |1 + mm/memblock.c| 20 3 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/n

[PATCH v1 02/12] acpi: Print Hot-Pluggable Field in SRAT.

2013-04-19 Thread Tang Chen
The Hot-Pluggable field in SRAT suggests if the memory could be hotplugged while the system is running. Print it as well when parsing SRAT will help users to know which memory is hotpluggable. Signed-off-by: Tang Chen --- arch/x86/mm/srat.c |9 ++--- 1 files changed, 6 insertions(+), 3

[PATCH v1 10/12] x86, memblock, mem-hotplug: Free hotpluggable memory reserved by memblock.

2013-04-19 Thread Tang Chen
We reserved hotpluggable memory in memblock. And when memory initialization is done, we have to free it to buddy system. This patch free memory reserved by memblock with flag MEMBLK_HOTPLUGGABLE. Signed-off-by: Tang Chen --- include/linux/memblock.h |1 + mm/memblock.c| 20

[PATCH v1 08/12] x86, numa, memblock: Introduce MEMBLK_LOCAL_NODE to mark and reserve node-life-cycle data.

2013-04-19 Thread Tang Chen
mapping pagetable pages, based on Yinghai's patch. Signed-off-by: Tang Chen --- arch/x86/mm/init.c | 16 include/linux/memblock.h |2 ++ mm/memblock.c|7 +++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/init.c b

[PATCH v1 00/12] Arrange hotpluggable memory in SRAT as ZONE_MOVABLE.

2013-04-19 Thread Tang Chen
the following things: 1) Parse SRAT early enough. 2)Allocate pagetable pages in local node. Tang Chen (11): acpi: Print Hot-Pluggable Field in SRAT. page_alloc, mem-hotplug: Improve movablecore to {en|dis}able using SRAT. x86, numa, acpi, memory-hotplug: Introduce hotplug info into struct

[PATCH v1 12/12] doc, page_alloc, acpi, mem-hotplug: Add doc for movablecore=acpi boot option.

2013-04-19 Thread Tang Chen
Since we modify movablecore boot option to support "movablecore=acpi", this patch adds doc for it. Signed-off-by: Tang Chen --- Documentation/kernel-parameters.txt |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/Documentation/kernel-paramet

[PATCH v1 09/12] x86, acpi, numa, mem-hotplug: Introduce MEMBLK_HOTPLUGGABLE to mark and reserve hotpluggable memory.

2013-04-19 Thread Tang Chen
freed to buddy when memory initialization is done. This idea is from Wen Congyang and Jiang Liu . Suggested-by: Jiang Liu Suggested-by: Wen Congyang Signed-off-by: Tang Chen --- arch/x86/mm/numa.c | 26 ++ include/linux/memblock.h |3 +++ mm/memblock.c

[tip:x86/mm] x86/mm/hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE

2013-04-15 Thread tip-bot for Tang Chen
Commit-ID: 587ff8c4eab1587044e69156f997e9d1d3b07709 Gitweb: http://git.kernel.org/tip/587ff8c4eab1587044e69156f997e9d1d3b07709 Author: Tang Chen AuthorDate: Mon, 15 Apr 2013 17:46:46 +0800 Committer: Ingo Molnar CommitDate: Mon, 15 Apr 2013 12:03:24 +0200 x86/mm/hotplug: Put

[PATCH 2/3] mem-hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE.

2013-04-15 Thread Tang Chen
o put kernel_physical_mapping_remove() in CONFIG_MEMORY_HOTREMOVE. Signed-off-by: Tang Chen --- arch/x86/mm/init_64.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 474e28f..dafdeb2 100644 --- a/arch/x86/mm/init_64.c

[PATCH 3/3] memblock: Fix missing comment of memblock_insert_region().

2013-04-15 Thread Tang Chen
There is no comment for parameter nid of memblock_insert_region(). This patch adds comment for it. Signed-off-by: Tang Chen --- mm/memblock.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index b8d9147..16eda3d 100644 --- a/mm

[PATCH 1/3] mm: Remove unused parameter of pages_correctly_reserved()

2013-04-15 Thread Tang Chen
nr_pages is not used in pages_correctly_reserved(). So remove it. Signed-off-by: Tang Chen Reviewed-by: Wang Shilong Reviewed-by: Wen Congyang --- drivers/base/memory.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/base/memory.c b/drivers/base/memory.c

[PATCH 0/3] Little error fix and cleanup.

2013-04-15 Thread Tang Chen
This patch-set did the following things: patch1: Remove unused parameter "nr_pages" of pages_correctly_reserved(). patch2: Use CONFIG_MEMORY_HOTREMOVE to protect kernel_physical_mapping_remove(). patch3: Add comments for parameter "nid" for memblock_insert_region(). Tang Ch

Re: [PATCH] firmware, memmap: fix firmware_map_entry leak

2013-04-15 Thread Tang Chen
Reviewed-by: Tang Chen Thanks. :) On 04/15/2013 01:48 PM, Yasuaki Ishimatsu wrote: > When hot removing a memory, a firmware_map_entry which has memory range > of the memory is released by release_firmware_map_entry(). If the entry > is allocated by bootmem, release_firmware_map_ent

Re: [PATCH 0/2] mm: vmemmap: add vmemmap_verify check for hot-add node/memory case

2013-04-11 Thread Tang Chen
On 04/11/2013 11:10 PM, Yinghai Lu wrote: On Thu, Apr 11, 2013 at 12:41 AM, Tang Chen wrote: 3. If we add flag to memblock, we can mark different memory. And I remember you mentioned before that we can use memblock to reserve local node data for node-life-cycle data, like vmemmap

Re: [PATCH 0/2] mm: vmemmap: add vmemmap_verify check for hot-add node/memory case

2013-04-11 Thread Tang Chen
Hi Yinghai, (Add cc Liu Jiang.) On 04/09/2013 02:40 AM, Yinghai Lu wrote: On Mon, Apr 8, 2013 at 2:56 AM, Lin Feng wrote: In hot add node(memory) case, vmemmap pages are always allocated from other node, that is broken, and should be fixed. vmemmap should be on local node even for hot add n

Re: [PATCH v3 02/22] x86, microcode: Use common get_ramdisk_image()

2013-04-09 Thread Tang Chen
On 04/05/2013 07:46 AM, Yinghai Lu wrote: Use common get_ramdisk_image() to get ramdisk start phys address. We need this to get correct ramdisk adress for 64bit bzImage that initrd can be loaded above 4G by kexec-tools. Signed-off-by: Yinghai Lu Cc: Fenghua Yu Acked-by: Tejun Heo --- arch/x86

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

2013-04-09 Thread Tang Chen
On 04/09/2013 01:14 PM, Yasuaki Ishimatsu wrote: > Hi Tang, > > The patch works well on my x86_64 box. > I confirmed that hotpluggable node is allocated as Movable Zone. > So feel free to add: > > Tested by: Yasuaki Ishimatsu > > Nitpick below. Thanks for testing. Will fix the whitespace error

[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

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

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

2013-03-26 Thread Tang Chen
have several different attributes. 2) Mark node-lify-cycle data, and put it on local node, and free it when hot-removing. 3) Mark and reserve movable memory, as you did. Thanks. :) On 03/21/2013 05:21 PM, Tang Chen wrote: Hi Yinghai, all, This patch-set is based on Yinghai's tree

[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

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

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

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

[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

[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

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

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

2013-03-16 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

<    2   3   4   5   6   7   8   9   10   11   >