[PATCH 13/21] x86, acpi: Try to find SRAT in firmware earlier.

2013-07-19 Thread Tang Chen
. Signed-off-by: Tang Chen --- drivers/acpi/acpica/tbxface.c | 34 ++ drivers/acpi/osl.c| 24 include/acpi/acpixf.h |4 include/linux/acpi.h |4 mm/memory_hotplug.c | 10

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

2013-07-19 Thread Tang Chen
. Otherwise, the system could failed to boot. Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Lai Jiangshan Signed-off-by: Tang Chen Signed-off-by: Jiang Liu Reviewed-by: Wanpeng Li --- arch/x86/mm/numa.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/numa.c

[PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-19 Thread Tang Chen
in different nodes together. PXM is the Proximity num provided by SRAT, used to map nid. At such an early time, we don't have nid, so we reserve PXM in memblock to prevent merging of different nodes' memory. Signed-off-by: Tang Chen --- drivers/acpi/osl.c | 65

[PATCH 08/21] x86, acpi: Also initialize signature and length when parsing root table.

2013-07-19 Thread Tang Chen
time. Signed-off-by: Tang Chen --- drivers/acpi/acpica/tbutils.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 9d68ffc..37cc5e4 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b

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

2013-07-19 Thread Tang Chen
to enable this functionality. For those who don't use memory hotplug or who don't want 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 Reviewed-by: Wanpeng Li --- arch/x86/kernel/setup.c|8 +++

[PATCH 05/21] acpi: Introduce acpi_invalid_table() to check if a table is invalid.

2013-07-19 Thread Tang Chen
in the subsequent patches. Signed-off-by: Tang Chen --- drivers/acpi/osl.c | 82 1 files changed, 57 insertions(+), 25 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 91d9f54..4531920 100644 --- a/drivers/acpi/osl.c

[PATCH 09/21] x86: Make get_ramdisk_{image|size}() global.

2013-07-19 Thread Tang Chen
In the following patches, we need to call get_ramdisk_{image|size}() to get initrd file's address and size. So make these two functions global. Signed-off-by: Tang Chen --- arch/x86/include/asm/setup.h |3 +++ arch/x86/kernel/setup.c |4 ++-- 2 files changed, 5 insertions(+), 2

[PATCH 15/21] x86, acpi, numa: Don't reserve memory on nodes the kernel resides in.

2013-07-19 Thread Tang Chen
if the memory in that node is hotpluggable, we don't reserve it. Signed-off-by: Tang Chen --- drivers/acpi/osl.c | 40 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 02a39e2..dfbe6ba 100644

[PATCH 10/21] earlycpio.c: Fix the confusing comment of find_cpio_data().

2013-07-19 Thread Tang Chen
)nptr - (long)data;/* data is the cpio file */ @offset is the offset of the next file, not the matching file itself. This is confused and may cause unnecessary waste of time to debug. So fix it. Signed-off-by: Tang Chen --- lib/earlycpio.c |7 --- 1 files changed, 4 insertions(+), 3

[PATCH 20/21] x86, numa, acpi, memory-hotplug: Make movablecore=acpi have higher priority.

2013-07-19 Thread Tang Chen
ll arrange hotpluggable memory in SRAT as ZONE_MOVABLE. And if users do this, all the other movablecore=nn@ss and kernelcore=nn@ss options should be ignored. For those who don't want this, just specify nothing. The kernel will act as before. Signed-off-by: Tang Chen Reviewed-by: Wanpeng Li --- inc

[PATCH 20/21] x86, numa, acpi, memory-hotplug: Make movablecore=acpi have higher priority.

2013-07-19 Thread Tang Chen
memory in SRAT as ZONE_MOVABLE. And if users do this, all the other movablecore=nn@ss and kernelcore=nn@ss options should be ignored. For those who don't want this, just specify nothing. The kernel will act as before. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Wanpeng Li liw

[PATCH 15/21] x86, acpi, numa: Don't reserve memory on nodes the kernel resides in.

2013-07-19 Thread Tang Chen
if the memory in that node is hotpluggable, we don't reserve it. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/osl.c | 40 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 02a39e2

[PATCH 10/21] earlycpio.c: Fix the confusing comment of find_cpio_data().

2013-07-19 Thread Tang Chen
)nptr - (long)data;/* data is the cpio file */ @offset is the offset of the next file, not the matching file itself. This is confused and may cause unnecessary waste of time to debug. So fix it. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- lib/earlycpio.c |7 --- 1 files changed

[PATCH 09/21] x86: Make get_ramdisk_{image|size}() global.

2013-07-19 Thread Tang Chen
In the following patches, we need to call get_ramdisk_{image|size}() to get initrd file's address and size. So make these two functions global. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/include/asm/setup.h |3 +++ arch/x86/kernel/setup.c |4 ++-- 2 files changed

[PATCH 05/21] acpi: Introduce acpi_invalid_table() to check if a table is invalid.

2013-07-19 Thread Tang Chen
in the subsequent patches. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/osl.c | 82 1 files changed, 57 insertions(+), 25 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 91d9f54..4531920 100644

[PATCH 08/21] x86, acpi: Also initialize signature and length when parsing root table.

2013-07-19 Thread Tang Chen
time. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/acpica/tbutils.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 9d68ffc..37cc5e4 100644 --- a/drivers/acpi

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

2013-07-19 Thread Tang Chen
. For those who don't use memory hotplug or who don't want to lose their NUMA performance, just don't specify anything. The kernel will work as before. Suggested-by: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Wanpeng Li liw

[PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-19 Thread Tang Chen
in different nodes together. PXM is the Proximity num provided by SRAT, used to map nid. At such an early time, we don't have nid, so we reserve PXM in memblock to prevent merging of different nodes' memory. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/osl.c | 65

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

2013-07-19 Thread Tang Chen
the first allocation fails. Otherwise, the system could failed to boot. Signed-off-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Jiang Liu jiang@huawei.com Reviewed-by: Wanpeng

[PATCH 13/21] x86, acpi: Try to find SRAT in firmware earlier.

2013-07-19 Thread Tang Chen
. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/acpica/tbxface.c | 34 ++ drivers/acpi/osl.c| 24 include/acpi/acpixf.h |4 include/linux/acpi.h |4 mm/memory_hotplug.c

[PATCH 16/21] x86, memblock, mem-hotplug: Free hotpluggable memory reserved by memblock.

2013-07-19 Thread Tang Chen
We reserved hotpluggable memory in memblock at early time. 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 tangc...@cn.fujitsu.com Reviewed-by: Wanpeng Li liw

[PATCH 18/21] x86, numa: Synchronize nid info in memblock.reserve with numa_meminfo.

2013-07-19 Thread Tang Chen
SRAT and fulfill nume_meminfo, synchronize the nid info to memblock.reserve[] immediately. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- arch/x86/mm/numa.c | 50 ++ 1 files

[PATCH 07/21] x86, acpi: Initialize ACPI root table list earlier.

2013-07-19 Thread Tang Chen
earlier, right after memblock is ready. When memblock_x86_fill() is called to fulfill memblock.memory[], memblock is able to allocate memory. This patch introduces a new function acpi_root_table_init() to do step 1, and call this function right after memblock_x86_fill() is called. Signed-off-by: Tang

[PATCH 12/21] x86, acpi: Try to find if SRAT is overrided earlier.

2013-07-19 Thread Tang Chen
. But early_ioremap() can only map at most 256KB at one time. So we use a loop to map the whole initrd file, and map only 256KB one time. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/kernel/setup.c|9 ++ drivers/acpi/osl.c | 55

[PATCH 00/21] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-07-19 Thread Tang Chen
as possible, this patch-set only parse memory affinities in SRAT one more time right after memblock is ready, and leave all the other pathes untouched. With the hotpluggable memory info, we can arrange hotpluggable memory in ZONE_MOVABLE to prevent the kernel to use it. Thanks. :) Tang Chen (20): acpi

[PATCH 01/21] acpi: Print Hot-Pluggable Field in SRAT.

2013-07-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 tangc...@cn.fujitsu.com Reviewed-by: Wanpeng Li liw...@linux.vnet.ibm.com

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

2013-07-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 tangc...@cn.fujitsu.com --- Documentation/kernel-parameters.txt | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/Documentation/kernel

[PATCH 03/21] x86, acpi, numa, mem-hotplug: Introduce MEMBLK_HOTPLUGGABLE to reserve hotpluggable memory.

2013-07-19 Thread Tang Chen
introduces MEMBLK_HOTPLUGGABLE flag, and an API to reserve memory with MEMBLK_HOTPLUGGABLE flag. This is a preparation for the coming patches. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- include/linux/memblock.h |2 ++ mm/memblock.c|6 ++ 2 files changed, 8

[PATCH 06/21] x86, acpi: Split acpi_boot_table_init() into two parts.

2013-07-19 Thread Tang Chen
acpi_gbl_root_table_list. (step 1 + 2 above) 2. Install all ACPI tables into acpi_gbl_root_table_list. (step 3 + 4 above) In later patches, we will do step 1 + 2 earlier. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/acpica/tbutils.c | 25 ++--- drivers/acpi/tables.c

[PATCH 02/21] memblock, numa: Introduce flag into memblock.

2013-07-19 Thread Tang Chen
other APIs to support flags, but keep their prototype unmodified. The idea is from Wen Congyang we...@cn.fujitsu.com and Liu Jiang jiang@huawei.com. Suggested-by: Wen Congyang we...@cn.fujitsu.com Suggested-by: Liu Jiang jiang@huawei.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com

[PATCH 04/21] acpi: Remove continue in macro INVALID_TABLE().

2013-07-19 Thread Tang Chen
the macro is called. (For now, it is only called in acpi_initrd_override().) The idea is from Yinghai Lu ying...@kernel.org. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Yinghai Lu ying...@kernel.org --- drivers/acpi/osl.c | 18 +- 1 files changed, 13 insertions(+), 5

[PATCH 19/21] x86, numa: Save nid when reserve memory into memblock.reserved[].

2013-07-19 Thread Tang Chen
. Reported-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- include/linux/memblock.h |1 + include/linux/mm.h |9 + mm/memblock.c| 11 +-- 3 files changed, 19 insertions(+), 2 deletions

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-24 Thread Tang Chen
On 06/24/2013 11:51 AM, Tang Chen wrote: On 06/22/2013 02:25 AM, Tejun Heo wrote: Hey, On Fri, Jun 21, 2013 at 05:19:48PM +0800, Tang Chen wrote: * As memblock allocator can relocate itself. There's no point in avoiding setting NUMA node while parsing and registering NUMA topology. Just parse

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-24 Thread Tang Chen
On 06/24/2013 11:51 AM, Tang Chen wrote: On 06/22/2013 02:25 AM, Tejun Heo wrote: Hey, On Fri, Jun 21, 2013 at 05:19:48PM +0800, Tang Chen wrote: * As memblock allocator can relocate itself. There's no point in avoiding setting NUMA node while parsing and registering NUMA topology. Just parse

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-23 Thread Tang Chen
On 06/22/2013 02:25 AM, Tejun Heo wrote: Hey, On Fri, Jun 21, 2013 at 05:19:48PM +0800, Tang Chen wrote: * As memblock allocator can relocate itself. There's no point in avoiding setting NUMA node while parsing and registering NUMA topology. Just parse and register NUMA info and later

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-23 Thread Tang Chen
On 06/22/2013 02:25 AM, Tejun Heo wrote: Hey, On Fri, Jun 21, 2013 at 05:19:48PM +0800, Tang Chen wrote: * As memblock allocator can relocate itself. There's no point in avoiding setting NUMA node while parsing and registering NUMA topology. Just parse and register NUMA info and later

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-21 Thread Tang Chen
Hi tj, On 06/20/2013 02:17 PM, Tejun Heo wrote: .. I was suggesting two separate things. * As memblock allocator can relocate itself. There's no point in avoiding setting NUMA node while parsing and registering NUMA topology. Just parse and register NUMA info and later tell it to

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-21 Thread Tang Chen
On 06/21/2013 02:10 PM, H. Peter Anvin wrote: On 06/20/2013 11:06 PM, Tang Chen wrote: Hi hpa, The build problem has been fixed by Yinghai. Where? I don't see anything that is obviously a fix in my inbox. Yinghai resent a new version to fix the problem. https://lkml.org/lkml/2013/6/14

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-21 Thread Tang Chen
On 06/21/2013 01:19 PM, H. Peter Anvin wrote: On 06/13/2013 06:02 AM, Tang Chen wrote: From: Yinghai Lu No offence, just rebase and resend the patches from Yinghai to help to push this functionality faster. Also improve the comments in the patches' log. So we need a new version

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-21 Thread Tang Chen
On 06/21/2013 01:19 PM, H. Peter Anvin wrote: On 06/13/2013 06:02 AM, Tang Chen wrote: From: Yinghai Luying...@kernel.org No offence, just rebase and resend the patches from Yinghai to help to push this functionality faster. Also improve the comments in the patches' log. So we need a new

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-21 Thread Tang Chen
On 06/21/2013 02:10 PM, H. Peter Anvin wrote: On 06/20/2013 11:06 PM, Tang Chen wrote: Hi hpa, The build problem has been fixed by Yinghai. Where? I don't see anything that is obviously a fix in my inbox. Yinghai resent a new version to fix the problem. https://lkml.org/lkml/2013/6/14

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-21 Thread Tang Chen
Hi tj, On 06/20/2013 02:17 PM, Tejun Heo wrote: .. I was suggesting two separate things. * As memblock allocator can relocate itself. There's no point in avoiding setting NUMA node while parsing and registering NUMA topology. Just parse and register NUMA info and later tell it to

Re: [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated()

2013-06-20 Thread Tang Chen
On 06/20/2013 09:17 PM, Zhang Yanfei wrote: On 06/20/2013 06:10 PM, Tang Chen wrote: pageblock_nr_page should be pageblock_nr_pages, and fist is a typo of first. Signed-off-by: Tang Chen --- mm/page_isolation.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated()

2013-06-20 Thread Tang Chen
pageblock_nr_page should be pageblock_nr_pages, and fist is a typo of first. Signed-off-by: Tang Chen --- mm/page_isolation.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 383bdbb..0cee10f 100644 --- a/mm

[PATCH 2/5] page_migrate: Fix wrong comment in address_space_operations->migratepage()

2013-06-20 Thread Tang Chen
There is no parameter "sync" in address_space_operations->migratepage(). It should be mograte_mode. And the comment is for MIGRATE_ASYNC. Signed-off-by: Tang Chen --- include/linux/fs.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/f

[PATCH 0/5] Fix some wrong comments.

2013-06-20 Thread Tang Chen
Fix some wrong comments found when reading code. Tang Chen (5): page_isolation: Fix a comment typo in test_pages_isolated() page_migrate: Fix wrong comment in address_space_operations->migratepage() aio: Fix wrong comment in aio_complete() memblock: Fix wrong comm

[PATCH 5/5] bootmem, numa: Fix a comment typo in register_page_bootmem_info_node()

2013-06-20 Thread Tang Chen
Signed-off-by: Tang Chen --- mm/memory_hotplug.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 1ad92b4..12ee2a0 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -220,13 +220,13 @@ void

[PATCH 4/5] memblock: Fix wrong comment in __next_free_mem_range()

2013-06-20 Thread Tang Chen
Remove one redundant "nid" in the comment. Signed-off-by: Tang Chen --- mm/memblock.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index c5fad93..a847bfe 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -566,7 +56

[PATCH 3/5] aio: Fix wrong comment in aio_complete()

2013-06-20 Thread Tang Chen
ctx->ctx_lock should be ctx->completion_lock. Signed-off-by: Tang Chen --- fs/aio.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 2bbcacf..e4a01fa 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -623,7 +623,7 @@ void aio_complete(struct kiocb

[PATCH 4/5] memblock: Fix wrong comment in __next_free_mem_range()

2013-06-20 Thread Tang Chen
Remove one redundant nid in the comment. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- mm/memblock.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index c5fad93..a847bfe 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -566,7

[PATCH 3/5] aio: Fix wrong comment in aio_complete()

2013-06-20 Thread Tang Chen
ctx-ctx_lock should be ctx-completion_lock. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- fs/aio.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 2bbcacf..e4a01fa 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -623,7 +623,7 @@ void

[PATCH 5/5] bootmem, numa: Fix a comment typo in register_page_bootmem_info_node()

2013-06-20 Thread Tang Chen
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- mm/memory_hotplug.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 1ad92b4..12ee2a0 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -220,13 +220,13

[PATCH 2/5] page_migrate: Fix wrong comment in address_space_operations-migratepage()

2013-06-20 Thread Tang Chen
There is no parameter sync in address_space_operations-migratepage(). It should be mograte_mode. And the comment is for MIGRATE_ASYNC. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- include/linux/fs.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux

[PATCH 0/5] Fix some wrong comments.

2013-06-20 Thread Tang Chen
Fix some wrong comments found when reading code. Tang Chen (5): page_isolation: Fix a comment typo in test_pages_isolated() page_migrate: Fix wrong comment in address_space_operations-migratepage() aio: Fix wrong comment in aio_complete() memblock: Fix wrong comment

[PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated()

2013-06-20 Thread Tang Chen
pageblock_nr_page should be pageblock_nr_pages, and fist is a typo of first. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- mm/page_isolation.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 383bdbb..0cee10f

Re: [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated()

2013-06-20 Thread Tang Chen
On 06/20/2013 09:17 PM, Zhang Yanfei wrote: On 06/20/2013 06:10 PM, Tang Chen wrote: pageblock_nr_page should be pageblock_nr_pages, and fist is a typo of first. Signed-off-by: Tang Chentangc...@cn.fujitsu.com --- mm/page_isolation.c |8 1 files changed, 4 insertions(+), 4

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-19 Thread Tang Chen
Hi tj, Yinghai, On 06/19/2013 01:21 AM, Tejun Heo wrote: Hey, Tang. On Tue, Jun 18, 2013 at 01:47:16PM +0800, Tang Chen wrote: [approach] Parse SRAT earlier before memblock starts to work, because there is a bit in SRAT specifying which memory is hotpluggable. I'm not saying this is the best

Re: [Part3 PATCH v2 0/4] Support hot-remove local pagetable pages.

2013-06-19 Thread Tang Chen
Hi Vasilis, Yinghai, On 06/19/2013 01:05 AM, Vasilis Liaskovitis wrote: .. This could be a design problem of part3: if we allow local pagetable memory to not be offlined but allow the offlining to return successfully, then hot-remove is going to succeed. But the direct mapped pagetable

Re: [Part2 PATCH v4 08/15] x86, numa: Save nid when reserve memory into memblock.reserved[].

2013-06-19 Thread Tang Chen
Hi Vasilis, Thanks for reviewing. :) On 06/19/2013 12:57 AM, Vasilis Liaskovitis wrote: .. However, patches 21,22 of part1 and all part3 patches increase kernel usage of local node memory by putting pagetables local to those nodes. Are these pagetable pages accounted in part2's

Re: [Part2 PATCH v4 08/15] x86, numa: Save nid when reserve memory into memblock.reserved[].

2013-06-19 Thread Tang Chen
Hi Vasilis, Thanks for reviewing. :) On 06/19/2013 12:57 AM, Vasilis Liaskovitis wrote: .. However, patches 21,22 of part1 and all part3 patches increase kernel usage of local node memory by putting pagetables local to those nodes. Are these pagetable pages accounted in part2's

Re: [Part3 PATCH v2 0/4] Support hot-remove local pagetable pages.

2013-06-19 Thread Tang Chen
Hi Vasilis, Yinghai, On 06/19/2013 01:05 AM, Vasilis Liaskovitis wrote: .. This could be a design problem of part3: if we allow local pagetable memory to not be offlined but allow the offlining to return successfully, then hot-remove is going to succeed. But the direct mapped pagetable

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-19 Thread Tang Chen
Hi tj, Yinghai, On 06/19/2013 01:21 AM, Tejun Heo wrote: Hey, Tang. On Tue, Jun 18, 2013 at 01:47:16PM +0800, Tang Chen wrote: [approach] Parse SRAT earlier before memblock starts to work, because there is a bit in SRAT specifying which memory is hotpluggable. I'm not saying this is the best

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-17 Thread Tang Chen
Hi tj, On 06/18/2013 10:03 AM, Tejun Heo wrote: .. So, can you please explain why you're doing the above? What are you trying to achieve in the end and why is this the best approach? This is all for memory hotplug, right? Yes, this is all for memory hotplug. [why] At early boot time

Re: [Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-17 Thread Tang Chen
Hi tj, On 06/18/2013 10:03 AM, Tejun Heo wrote: .. So, can you please explain why you're doing the above? What are you trying to achieve in the end and why is this the best approach? This is all for memory hotplug, right? Yes, this is all for memory hotplug. [why] At early boot time

Re: [Part3 PATCH v2 0/4] Support hot-remove local pagetable pages.

2013-06-16 Thread Tang Chen
On 06/17/2013 09:58 AM, Jianguo Wu wrote: Hi Tang, On 2013/6/13 21:03, Tang Chen wrote: The following patch-set from Yinghai allocates pagetables to local nodes. v1: https://lkml.org/lkml/2013/3/7/642 v2: https://lkml.org/lkml/2013/3/10/47 v3: https://lkml.org/lkml/2013/4/4/639 v4: https

Re: [Part3 PATCH v2 0/4] Support hot-remove local pagetable pages.

2013-06-16 Thread Tang Chen
On 06/17/2013 09:58 AM, Jianguo Wu wrote: Hi Tang, On 2013/6/13 21:03, Tang Chen wrote: The following patch-set from Yinghai allocates pagetables to local nodes. v1: https://lkml.org/lkml/2013/3/7/642 v2: https://lkml.org/lkml/2013/3/10/47 v3: https://lkml.org/lkml/2013/4/4/639 v4: https

Re: [Part3 PATCH v2 2/4] mem-hotplug: Skip LOCAL_NODE_DATA pages in memory offline procedure.

2013-06-13 Thread Tang Chen
Hi Dave, On 06/14/2013 01:17 AM, Dave Hansen wrote: On 06/13/2013 06:03 AM, Tang Chen wrote: +static inline bool is_local_node_data(struct page *page) +{ + return (unsigned long)page->lru.next == LOCAL_NODE_DATA; +} page->lru is already in a union. Could you please just add

Re: [Part3 PATCH v2 1/4] bootmem, mem-hotplug: Register local pagetable pages with LOCAL_NODE_DATA when freeing bootmem.

2013-06-13 Thread Tang Chen
Hi Michal, Please see below. On 06/13/2013 10:16 PM, Michal Nazarewicz wrote: .. diff --git a/include/linux/memblock.h b/include/linux/memblock.h index a85ced9..8a38eef 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -131,6 +131,28 @@ void

Re: [Part1 PATCH v5 21/22] x86, mm: Make init_mem_mapping be able to be called several times

2013-06-13 Thread Tang Chen
On 06/14/2013 06:47 AM, Yinghai Lu wrote: On Thu, Jun 13, 2013 at 11:35 AM, Konrad Rzeszutek Wilk wrote: Tang Chen wrote: From: Yinghai Lu Prepare to put page table on local nodes. Move calling of init_mem_mapping() to early_initmem_init(). Rework alloc_low_pages to allocate page table

[Part2 PATCH v4 09/15] x86, numa, mem-hotplug: Mark nodes which the kernel resides in.

2013-06-13 Thread Tang Chen
arrange them as un-hotpluggable. Signed-off-by: Tang Chen --- arch/x86/mm/numa.c | 10 ++ include/linux/memblock.h |1 + mm/memblock.c| 20 3 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm

[Part2 PATCH v4 01/15] x86: get pg_data_t's memory from other node

2013-06-13 Thread Tang Chen
. Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Lai Jiangshan Signed-off-by: Tang Chen Signed-off-by: Jiang Liu Reviewed-by: Wanpeng Li --- 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 5adf803..bea597a

[Part3 PATCH v2 4/4] mem-hotplug: Do not free LOCAL_NODE_DATA pages to buddy system in hot-remove procedure.

2013-06-13 Thread Tang Chen
ent freeing LOCAL_NODE_DATA pages in free_pagetable() instead of in put_page_bootmem(). Suggested-by: Wu Jianguo Signed-off-by: Tang Chen --- arch/x86/mm/init_64.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c in

[Part2 PATCH v4 13/15] x86, memblock, mem-hotplug: Free hotpluggable memory reserved by memblock.

2013-06-13 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 Reviewed-by: Wanpeng Li --- include/linux/memblock.h |1 + mm

[Part3 PATCH v2 0/4] Support hot-remove local pagetable pages.

2013-06-13 Thread Tang Chen
patch2: As suggested by Wu Jianguo, define a macro to check if a page cantains local node data. patch4: As suggested by Wu Jianguo, prevent freeing LOCAL_NODE_DATA pages in free_pagetable() instead of in put_page_bootmem(). Tang Chen (4): bootmem, mem-hotplug: Re

[Part2 PATCH v4 02/15] acpi: Print Hot-Pluggable Field in SRAT.

2013-06-13 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 Reviewed-by: Wanpeng Li --- arch/x86/mm/srat.c | 11 +++ 1 files

[Part3 PATCH v2 3/4] mem-hotplug: Skip LOCAL_NODE_DATA pages in memory online procedure.

2013-06-13 Thread Tang Chen
Pages marked as LOCAL_NODE_DATA are skipped when we do memory offline. So we have to skip them again when we do memory online. Signed-off-by: Tang Chen --- mm/memory_hotplug.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c

[Part1 PATCH v5 14/22] x86, mm, numa: Set memblock nid later

2013-06-13 Thread Tang Chen
numa_register_memblks to numa_check_memblks() after moving out code of setting memblock nid. Signed-off-by: Yinghai Lu Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/mm/numa.c | 16 +++- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86

[Part2 PATCH v4 08/15] x86, numa: Save nid when reserve memory into memblock.reserved[].

2013-06-13 Thread Tang Chen
Since we introduced numa_sync_memblock_nid synchronize nid info in memblock.reserved[] and numa_meminfo, when numa_meminfo has been initialized, we need to save the nid into memblock.reserved[] when we reserve memory. Reported-by: Vasilis Liaskovitis Signed-off-by: Tang Chen --- include/linux

[Part2 PATCH v4 15/15] doc, page_alloc, acpi, mem-hotplug: Add doc for movablecore=acpi boot option.

2013-06-13 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

[Part1 PATCH v5 20/22] x86, mm: Add comments for step_size shift

2013-06-13 Thread Tang Chen
From: Yinghai Lu As requested by hpa, add comments for why we choose 5 to be the step size shift. Signed-off-by: Yinghai Lu Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/mm/init.c | 21 ++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/arch

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

2013-06-13 Thread Tang Chen
() 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/mm/numa.c

[Part2 PATCH v4 00/15] Arrange hotpluggable memory in SRAT as ZONE_MOVABLE.

2013-06-13 Thread Tang Chen
o: v1: https://lkml.org/lkml/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 (14): acpi

[Part2 PATCH v4 11/15] x86, numa, memblock: Introduce MEMBLK_LOCAL_NODE to mark and reserve node-life-cycle data.

2013-06-13 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|6 ++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/init.c b/arch

[Part1 PATCH v5 12/22] x86, mm, numa: Move node_map_pfn_alignment() to x86

2013-06-13 Thread Tang Chen
From: Yinghai Lu Move node_map_pfn_alignment() to arch/x86/mm as there is no other user for it. Will update it to use numa_meminfo instead of memblock. Signed-off-by: Yinghai Lu Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/mm/numa.c | 50

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

2013-06-13 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

[Part3 PATCH v2 2/4] mem-hotplug: Skip LOCAL_NODE_DATA pages in memory offline procedure.

2013-06-13 Thread Tang Chen
pages will be skipped. After the iteration of all page, the block will be set as offline, but the kernel can still access the pagetable pages. This is user transparent. v1 -> v2: As suggested by Wu Jianguo , define a macro to check if a page contains local node data. Signed-off-by: T

[Part2 PATCH v4 07/15] x86, numa: Synchronize nid info in memblock.reserve with numa_meminfo.

2013-06-13 Thread Tang Chen
to memblock.reserve[] immediately. Signed-off-by: Tang Chen Signed-off-by: Vasilis Liaskovitis --- arch/x86/mm/numa.c | 49 + 1 files changed, 49 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 05e4443

[Part1 PATCH v5 11/22] x86, mm, numa: Call numa_meminfo_cover_memory() checking early

2013-06-13 Thread Tang Chen
we can move that numa_meminfo_cover_memory() early. Also we could change __absent_pages_in_range() to static and use absent_pages_in_range() directly. Later we will set memblock nid only once on successful path. Signed-off-by: Yinghai Lu Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch

[Part1 PATCH v5 15/22] x86, mm, numa: Move node_possible_map setting later

2013-06-13 Thread Tang Chen
-by: Tang Chen Tested-by: Tang Chen --- arch/x86/mm/numa.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index e448b6f..da2ebab 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -536,12 +536,13 @@ static

[Part1 PATCH v5 13/22] x86, mm, numa: Use numa_meminfo to check node_map_pfn alignment

2013-06-13 Thread Tang Chen
From: Yinghai Lu We could use numa_meminfo directly instead of memblock nid in node_map_pfn_alignment(). So we could do setting memblock nid later and only do it once for successful path. -v2: according to tj, separate moving to another patch. Signed-off-by: Yinghai Lu Reviewed-by: Tang Chen

[Part1 PATCH v5 22/22] x86, mm, numa: Put pagetable on local node ram for 64bit

2013-06-13 Thread Tang Chen
page table will be on low range or local nodes. Signed-off-by: Yinghai Lu Cc: Pekka Enberg Cc: Jacob Shin Cc: Konrad Rzeszutek Wilk Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/mm/numa.c | 34 +- 1 files changed, 33 insertions(+), 1 deletions

[Part1 PATCH v5 05/22] x86, ACPI: Increase acpi initrd override tables number limit

2013-06-13 Thread Tang Chen
comments about mapping table one by one during copying per tj. Signed-off-by: Yinghai Cc: Rafael J. Wysocki Cc: linux-a...@vger.kernel.org Acked-by: Tejun Heo Tested-by: Thomas Renninger Reviewed-by: Tang Chen Tested-by: Tang Chen --- drivers/acpi/osl.c | 26 +++--- 1

[Part1 PATCH v5 00/22] x86, ACPI, numa: Parse numa info earlier

2013-06-13 Thread Tang Chen
| Author: Tang Chen | Date: Fri Feb 22 16:33:44 2013 -0800 | |acpi, memory-hotplug: parse SRAT before memblock is ready It broke several things, like acpi override and fall back path etc. This patchset is clean implementation that will parse numa info early. 1. keep the acpi table initrd

[Part1 PATCH v5 04/22] x86, ACPI: Search buffer above 4GB in a second try for acpi initrd table override

2013-06-13 Thread Tang Chen
(), using memory above 4GB is OK. Signed-off-by: Yinghai Lu Cc: "Rafael J. Wysocki" Cc: linux-a...@vger.kernel.org Tested-by: Thomas Renninger Reviewed-by: Tang Chen Tested-by: Tang Chen --- drivers/acpi/osl.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dr

[Part1 PATCH v5 16/22] x86, mm, numa: Move numa emulation handling down.

2013-06-13 Thread Tang Chen
the original numa_meminfo not changed. Signed-off-by: Yinghai Lu Cc: David Rientjes Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/mm/numa.c |6 +++--- arch/x86/mm/numa_emulation.c |2 +- arch/x86/mm/numa_internal.h |2 ++ 3 files changed, 6 insertions(+), 4 deletions

[Part1 PATCH v5 02/22] x86, microcode: Use common get_ramdisk_{image|size}()

2013-06-13 Thread Tang Chen
that is found by Tang Chen Signed-off-by: Yinghai Lu Cc: Fenghua Yu Acked-by: Tejun Heo Tested-by: Thomas Renninger Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/kernel/microcode_intel_early.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86

[Part1 PATCH v5 07/22] x86, ACPI: Store override acpi tables phys addr in cpio files info array

2013-06-13 Thread Tang Chen
which tj is not happy with. Signed-off-by: Yinghai Lu Cc: Rafael J. Wysocki Cc: linux-a...@vger.kernel.org Tested-by: Thomas Renninger Reviewed-by: Tang Chen Tested-by: Tang Chen --- drivers/acpi/osl.c | 15 +++ 1 files changed, 11 insertions(+), 4 deletions(-) diff --git

[Part2 PATCH v4 06/15] memblock, numa: Introduce flag into memblock.

2013-06-13 Thread Tang Chen
t; v4: Define the flags with macro directly instead of bit shift. Suggested-by: Wen Congyang Suggested-by: Liu Jiang Signed-off-by: Tang Chen --- include/linux/memblock.h |4 +++ mm/memblock.c| 55 + 2 files changed, 44 insertions(+), 15 d

[Part1 PATCH v5 19/22] x86, mm: Parse numa info earlier

2013-06-13 Thread Tang Chen
early_initmem_init before init_mem_mapping() to prepare to use numa_info with it. Signed-off-by: Yinghai Lu Cc: Pekka Enberg Cc: Jacob Shin Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/kernel/setup.c | 24 ++-- 1 files changed, 10 insertions(+), 14 deletions

[Part3 PATCH v2 1/4] bootmem, mem-hotplug: Register local pagetable pages with LOCAL_NODE_DATA when freeing bootmem.

2013-06-13 Thread Tang Chen
ark this type of memory. Signed-off-by: Tang Chen --- arch/x86/mm/init_64.c |2 + include/linux/memblock.h | 22 + include/linux/memory_hotplug.h | 13 - mm/memblock.c | 52 mm/memory_hotplu

<    6   7   8   9   10   11   12   13   14   15   >