[PATCH v2 08/18] x86: get pg_data_t's memory from other node

2013-08-01 Thread Tang Chen
-by: Tang Chen Signed-off-by: Jiang Liu Reviewed-by: Wanpeng Li Reviewed-by: Zhang Yanfei --- 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 a71c4e2..5013583 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86

[PATCH v2 07/18] x86, acpi: Also initialize signature and length when parsing root table.

2013-08-01 Thread Tang Chen
time. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/acpica/tbutils.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 9d68ffc..5d31887 100644 --- a/drivers

[PATCH v2 11/18] x86, acpi: Try to find SRAT in firmware earlier.

2013-08-01 Thread Tang Chen
. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/acpica/tbxface.c | 32 drivers/acpi/osl.c| 22 ++ include/acpi/acpixf.h |4 include/linux/acpi.h |4 mm/memory_hotplug.c

[PATCH v2 14/18] memblock, numa: Introduce flag into memblock.

2013-08-01 Thread Tang Chen
just MEMBLK_HOTPLUG. So remove MEMBLK_DEFAULT (which is 0), and just use 0 by default to avoid confusions to users. Suggested-by: Wen Congyang Suggested-by: Liu Jiang Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- include/linux/memblock.h |1 + mm/membl

[PATCH v2 12/18] x86, acpi, numa, mem_hotplug: Find hotpluggable memory in SRAT memory affinities.

2013-08-01 Thread Tang Chen
the nodes the kerenl resides in unhotpluggable. So, before we do this, we don't mark any hotpluggable memory in memory so that to keep memblock working as before. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/osl.c | 85

[PATCH v2 16/18] memblock, mem_hotplug: Make memblock skip hotpluggable regions by default.

2013-08-01 Thread Tang Chen
k won't skip any memory, which means the kernel will act as before. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- mm/memblock.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index 05e142b..84bd568 100644 --- a/mm/memblock.c +++

[PATCH v2 15/18] memblock, mem_hotplug: Introduce MEMBLOCK_HOTPLUG flag to mark hotpluggable regions.

2013-08-01 Thread Tang Chen
the hotpluggable memory regions in memblock and a function memblock_mark_hotplug() to mark hotpluggable memory if we find one. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- include/linux/memblock.h | 12 mm/memblock.c| 26 ++ mm

[PATCH v2 17/18] mem-hotplug: Introduce movablenode boot option to {en|dis}able using SRAT.

2013-08-01 Thread Tang Chen
ctionality. 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 Reviewed-by: Zhang Yanfei --- Documentat

[PATCH v2 13/18] x86, numa, mem_hotplug: Skip all the regions the kernel resides in.

2013-08-01 Thread Tang Chen
won't have enough memory to boot. This patch finds out which memory regions the kernel resides in, and skip them when finding all hotpluggable memory regions. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- mm/memory_hotplug.c | 45 + 1 files

[PATCH v2 00/18] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-01 Thread Tang Chen
;movablenode" boot option. Thanks. Tang Chen (17): acpi: Print Hot-Pluggable Field in SRAT. earlycpio.c: Fix the confusing comment of find_cpio_data(). acpi: Remove "continue" in macro INVALID_TABLE(). acpi: Introduce acpi_invalid_table() to check if a tab

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

2013-08-01 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. v1 -> v2: As tj suggested, make these two function static inline in arch/x86/include/asm/setup.h. Signed-off-by: Tang Chen Reviewed-by: Zhang Yan

[PATCH v2 10/18] x86, acpi: Try to find if SRAT is overrided earlier.

2013-08-01 Thread Tang Chen
early_acpi_override_srat() to find out which memory is hotpluggable in the override SRAT. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- arch/x86/kernel/setup.c| 10 +++ drivers/acpi/osl.c | 58 include/linux/acpi.h

[PATCH v2 10/18] x86, acpi: Try to find if SRAT is overrided earlier.

2013-08-01 Thread Tang Chen
early_acpi_override_srat() to find out which memory is hotpluggable in the override SRAT. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- arch/x86/kernel/setup.c| 10 +++ drivers/acpi/osl.c | 58

[PATCH v2 00/18] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-01 Thread Tang Chen
. Thanks. Tang Chen (17): acpi: Print Hot-Pluggable Field in SRAT. earlycpio.c: Fix the confusing comment of find_cpio_data(). acpi: Remove continue in macro INVALID_TABLE(). acpi: Introduce acpi_invalid_table() to check if a table is invalid. x86, acpi: Split acpi_boot_table_init

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

2013-08-01 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. v1 - v2: As tj suggested, make these two function static inline in arch/x86/include/asm/setup.h. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com

[PATCH v2 15/18] memblock, mem_hotplug: Introduce MEMBLOCK_HOTPLUG flag to mark hotpluggable regions.

2013-08-01 Thread Tang Chen
the hotpluggable memory regions in memblock and a function memblock_mark_hotplug() to mark hotpluggable memory if we find one. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- include/linux/memblock.h | 12 mm/memblock.c

[PATCH v2 17/18] mem-hotplug: Introduce movablenode boot option to {en|dis}able using SRAT.

2013-08-01 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 v2 13/18] x86, numa, mem_hotplug: Skip all the regions the kernel resides in.

2013-08-01 Thread Tang Chen
won't have enough memory to boot. This patch finds out which memory regions the kernel resides in, and skip them when finding all hotpluggable memory regions. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- mm/memory_hotplug.c | 45

[PATCH v2 12/18] x86, acpi, numa, mem_hotplug: Find hotpluggable memory in SRAT memory affinities.

2013-08-01 Thread Tang Chen
the nodes the kerenl resides in unhotpluggable. So, before we do this, we don't mark any hotpluggable memory in memory so that to keep memblock working as before. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- drivers/acpi/osl.c | 85

[PATCH v2 16/18] memblock, mem_hotplug: Make memblock skip hotpluggable regions by default.

2013-08-01 Thread Tang Chen
, which means the kernel will act as before. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- mm/memblock.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index 05e142b..84bd568

[PATCH v2 14/18] memblock, numa: Introduce flag into memblock.

2013-08-01 Thread Tang Chen
| MEMBLK_HOTPLUG or just MEMBLK_HOTPLUG. So remove MEMBLK_DEFAULT (which is 0), and just use 0 by default to avoid confusions to users. Suggested-by: Wen Congyang we...@cn.fujitsu.com Suggested-by: Liu Jiang jiang@huawei.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan

[PATCH v2 11/18] x86, acpi: Try to find SRAT in firmware earlier.

2013-08-01 Thread Tang Chen
. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- drivers/acpi/acpica/tbxface.c | 32 drivers/acpi/osl.c| 22 ++ include/acpi/acpixf.h |4 include/linux/acpi.h

[PATCH v2 08/18] x86: get pg_data_t's memory from other node

2013-08-01 Thread Tang Chen
...@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 Li liw...@linux.vnet.ibm.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- arch/x86/mm/numa.c |5

[PATCH v2 07/18] x86, acpi: Also initialize signature and length when parsing root table.

2013-08-01 Thread Tang Chen
time. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- drivers/acpi/acpica/tbutils.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica

[PATCH v2 05/18] x86, acpi: Split acpi_boot_table_init() into two parts.

2013-08-01 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 Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- drivers/acpi/acpica/tbutils.c

[PATCH v2 02/18] earlycpio.c: Fix the confusing comment of find_cpio_data().

2013-08-01 Thread Tang Chen
the new comments. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- lib/earlycpio.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/earlycpio.c b/lib/earlycpio.c index 8078ef4..7affac0

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

2013-08-01 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 v2 04/18] acpi: Introduce acpi_invalid_table() to check if a table is invalid.

2013-08-01 Thread Tang Chen
in the subsequent patches. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- drivers/acpi/osl.c | 86 +--- 1 files changed, 61 insertions(+), 25 deletions(-) diff --git a/drivers/acpi/osl.c

[PATCH v2 06/18] x86, acpi: Initialize ACPI root table list earlier.

2013-08-01 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 v2 03/18] acpi: Remove continue in macro INVALID_TABLE().

2013-08-01 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 Acked-by: Tejun Heo t...@kernel.org Reviewed-by: Zhang Yanfei zhangyan

[PATCH v2 18/18] x86, numa, acpi, memory-hotplug: Make movablenode have higher priority.

2013-08-01 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

Re: [PATCH v2 03/18] acpi: Remove continue in macro INVALID_TABLE().

2013-08-01 Thread Tang Chen
On 08/02/2013 06:06 AM, Toshi Kani wrote: .. /* Non-fatal errors: Affected tables/files are ignored */ #define INVALID_TABLE(x, path, name) \ Since you are touching this macro, I'd suggest to rename it something like ACPI_INVALID_TABLE().

Re: [PATCH v2 04/18] acpi: Introduce acpi_invalid_table() to check if a table is invalid.

2013-08-01 Thread Tang Chen
On 08/02/2013 06:26 AM, Toshi Kani wrote: .. +int __init acpi_invalid_table(struct cpio_data *file, + const char *path, const char *signature) Since this function verifies a given acpi table in initrd (not that the table is invalid), I'd suggest to rename it

Re: [PATCH v2 02/18] earlycpio.c: Fix the confusing comment of find_cpio_data().

2013-08-01 Thread Tang Chen
On 08/02/2013 05:57 AM, Toshi Kani wrote: .. struct cpio_data __cpuinit find_cpio_data(const char *path, void *data, This patch does not apply cleanly. It seems that your branch does not have 0db0628d90125193280eabb501c94feaf48fa9ab. I have rebased the patch-set to linux 3.11-rc3.

Re: [PATCH v2 10/18] x86, acpi: Try to find if SRAT is overrided earlier.

2013-08-01 Thread Tang Chen
On 08/02/2013 09:19 AM, Toshi Kani wrote: .. +phys_addr_t __init early_acpi_override_srat(void) +{ + int i; + u32 length; + long offset; + void *ramdisk_vaddr; + struct acpi_table_header *table; + struct cpio_data file; + unsigned long map_step =

Re: [PATCH v2 13/18] x86, numa, mem_hotplug: Skip all the regions the kernel resides in.

2013-08-01 Thread Tang Chen
On 08/01/2013 09:42 PM, Tejun Heo wrote: On Thu, Aug 01, 2013 at 03:06:35PM +0800, Tang Chen wrote: At early time, memblock will reserve some memory for the kernel, such as the kernel code and data segments, initrd file, and so on=EF=BC=8C which means the kernel resides in these memory regions

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

2013-07-28 Thread Tang Chen
On 07/26/2013 06:26 PM, Tejun Heo wrote: On Fri, Jul 26, 2013 at 11:45:36AM +0800, Tang Chen wrote: I just don't want to any new variables to store the hotpluggable regions. But without a new shared variable, it seems difficult to achieve the goal you said below. Why can't it be done

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

2013-07-28 Thread Tang Chen
On 07/26/2013 06:26 PM, Tejun Heo wrote: On Fri, Jul 26, 2013 at 11:45:36AM +0800, Tang Chen wrote: I just don't want to any new variables to store the hotpluggable regions. But without a new shared variable, it seems difficult to achieve the goal you said below. Why can't it be done

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

2013-07-25 Thread Tang Chen
On 07/25/2013 11:05 PM, Tejun Heo wrote: Hello, Tang. On Thu, Jul 25, 2013 at 12:09:29PM +0800, Tang Chen wrote: And as in [patch 14/21], when reserving hotpluggable memory, we use pxm. So my Which is kinda nasty. Yes, will remove it. idea was to do a nid sync in numa_init(). After

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

2013-07-25 Thread Tang Chen
On 07/25/2013 11:09 PM, Tejun Heo wrote: Hello, Tang. On Thu, Jul 25, 2013 at 11:50:12AM +0800, Tang Chen wrote: movablecore boot option was used to specify the size of ZONE_MOVABLE. And this patch-set aims to arrange ZONE_MOVABLE with SRAT info. So my original thinking is to reuse movablecore

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

2013-07-25 Thread Tang Chen
On 07/25/2013 11:17 PM, Tejun Heo wrote: Hello, On Thu, Jul 25, 2013 at 10:13:21AM +0800, Tang Chen wrote: This is rather hacky. Why not just introduce MEMBLOCK_NO_MERGE flag? The original thinking is to merge regions with the same nid. So I used pxm. And then refresh the nid field when

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

2013-07-25 Thread Tang Chen
On 07/24/2013 03:45 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:21PM +0800, Tang Chen wrote: @@ -514,6 +514,7 @@ acpi_tb_install_table(acpi_physical_address address, * fully mapped later (in verify table). In any case, we must * unmap the header that was mapped above

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

2013-07-25 Thread Tang Chen
On 07/24/2013 11:54 PM, Tejun Heo wrote: On Wed, Jul 24, 2013 at 10:53:10AM +0800, Tang Chen wrote: Let's please drop "with" and do we really need to print full 16 digits? Sure, will remove "with". But I think printing out the full flags is batter. The output seems

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

2013-07-25 Thread Tang Chen
On 07/24/2013 11:54 PM, Tejun Heo wrote: On Wed, Jul 24, 2013 at 10:53:10AM +0800, Tang Chen wrote: Let's please drop with and do we really need to print full 16 digits? Sure, will remove with. But I think printing out the full flags is batter. The output seems more tidy. I mean, padding

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

2013-07-25 Thread Tang Chen
On 07/24/2013 03:45 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:21PM +0800, Tang Chen wrote: @@ -514,6 +514,7 @@ acpi_tb_install_table(acpi_physical_address address, * fully mapped later (in verify table). In any case, we must * unmap the header that was mapped above

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

2013-07-25 Thread Tang Chen
On 07/25/2013 11:17 PM, Tejun Heo wrote: Hello, On Thu, Jul 25, 2013 at 10:13:21AM +0800, Tang Chen wrote: This is rather hacky. Why not just introduce MEMBLOCK_NO_MERGE flag? The original thinking is to merge regions with the same nid. So I used pxm. And then refresh the nid field when

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

2013-07-25 Thread Tang Chen
On 07/25/2013 11:09 PM, Tejun Heo wrote: Hello, Tang. On Thu, Jul 25, 2013 at 11:50:12AM +0800, Tang Chen wrote: movablecore boot option was used to specify the size of ZONE_MOVABLE. And this patch-set aims to arrange ZONE_MOVABLE with SRAT info. So my original thinking is to reuse movablecore

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

2013-07-25 Thread Tang Chen
On 07/25/2013 11:05 PM, Tejun Heo wrote: Hello, Tang. On Thu, Jul 25, 2013 at 12:09:29PM +0800, Tang Chen wrote: And as in [patch 14/21], when reserving hotpluggable memory, we use pxm. So my Which is kinda nasty. Yes, will remove it. idea was to do a nid sync in numa_init(). After

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:25 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:31PM +0800, Tang Chen wrote: Vasilis Liaskovitis found that before we parse SRAT and fulfill numa_meminfo, the nids of all the regions in memblock.reserve[] are MAX_NUMNODES. That is because nids have not been mapped

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:21 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:34PM +0800, Tang Chen wrote: Since we modify movablecore boot option to support "movablecore=acpi", this patch adds doc for it. Please fold this into the patch which makes the code chnage. OK, followe

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:11 AM, Tejun Heo wrote: On Tue, Jul 23, 2013 at 05:04:35PM -0400, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:30PM +0800, Tang Chen wrote: ... Users can specify "movablecore=acpi" in kernel commandline to enable this functionality. For those who don't use memo

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:00 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:29PM +0800, Tang Chen wrote: 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

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

2013-07-24 Thread Tang Chen
On 07/24/2013 04:59 AM, Tejun Heo wrote: .. +static bool __init kernel_resides_in_range(phys_addr_t base, u64 length) +{ + int i; + struct memblock_type *reserved = + struct memblock_region *region; + phys_addr_t start, end; + + for (i = 0; i< reserved->cnt;

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:32 AM, Tejun Heo wrote: On Tue, Jul 23, 2013 at 04:55:57PM -0400, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:27PM +0800, Tang Chen wrote: + /* +* In such an early time, we don't have nid. We specify pxm +* instead

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

2013-07-24 Thread Tang Chen
On 07/24/2013 07:26 AM, Cody P Schafer wrote: On 07/19/2013 12:59 AM, Tang Chen wrote: .. +/* + * acpi_get_table_desc - Get the acpi table descriptor of a specific table. + * @signature: The signature of the table to be found. + * @out_desc: The out returned descriptor. The "@out

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

2013-07-24 Thread Tang Chen
On 07/24/2013 04:49 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:26PM +0800, Tang Chen wrote: .. + for (pos = 0; +pos< acpi_gbl_root_table_list.current_table_count; +pos++) { + if (!ACPI_COMPARE_N

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

2013-07-24 Thread Tang Chen
On 07/24/2013 04:27 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:25PM +0800, Tang Chen wrote: As we mentioned in previous patches, to prevent the kernel Prolly best to briefly describe what the overall goal is about. Sure. Here is the overall picture, and will add it to log. Linux

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:32 AM, Tejun Heo wrote: On Tue, Jul 23, 2013 at 04:55:57PM -0400, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:27PM +0800, Tang Chen wrote: + /* +* In such an early time, we don't have nid. We specify pxm +* instead

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

2013-07-24 Thread Tang Chen
On 07/24/2013 04:59 AM, Tejun Heo wrote: .. +static bool __init kernel_resides_in_range(phys_addr_t base, u64 length) +{ + int i; + struct memblock_type *reserved =memblock.reserved; + struct memblock_region *region; + phys_addr_t start, end; + + for (i = 0; i

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:00 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:29PM +0800, Tang Chen wrote: 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

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:11 AM, Tejun Heo wrote: On Tue, Jul 23, 2013 at 05:04:35PM -0400, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:30PM +0800, Tang Chen wrote: ... Users can specify movablecore=acpi in kernel commandline to enable this functionality. For those who don't use memory hotplug

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:21 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:34PM +0800, Tang Chen wrote: Since we modify movablecore boot option to support movablecore=acpi, this patch adds doc for it. Please fold this into the patch which makes the code chnage. OK, followed. Thanks

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

2013-07-24 Thread Tang Chen
On 07/24/2013 05:25 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:31PM +0800, Tang Chen wrote: Vasilis Liaskovitis found that before we parse SRAT and fulfill numa_meminfo, the nids of all the regions in memblock.reserve[] are MAX_NUMNODES. That is because nids have not been mapped

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

2013-07-24 Thread Tang Chen
On 07/24/2013 04:27 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:25PM +0800, Tang Chen wrote: As we mentioned in previous patches, to prevent the kernel Prolly best to briefly describe what the overall goal is about. Sure. Here is the overall picture, and will add it to log. Linux

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

2013-07-24 Thread Tang Chen
On 07/24/2013 04:49 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:26PM +0800, Tang Chen wrote: .. + for (pos = 0; +pos acpi_gbl_root_table_list.current_table_count; +pos++) { + if (!ACPI_COMPARE_NAME

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

2013-07-24 Thread Tang Chen
On 07/24/2013 07:26 AM, Cody P Schafer wrote: On 07/19/2013 12:59 AM, Tang Chen wrote: .. +/* + * acpi_get_table_desc - Get the acpi table descriptor of a specific table. + * @signature: The signature of the table to be found. + * @out_desc: The out returned descriptor. The @out_desc

[tip:x86/apic] x86/acpi: Fix incorrect sanity check in acpi_register_lapic()

2013-07-23 Thread tip-bot for Tang Chen
Commit-ID: 82982d729319e975115d88cae4927dffb02bfea7 Gitweb: http://git.kernel.org/tip/82982d729319e975115d88cae4927dffb02bfea7 Author: Tang Chen AuthorDate: Tue, 23 Jul 2013 16:00:19 +0800 Committer: Ingo Molnar CommitDate: Tue, 23 Jul 2013 10:08:16 +0200 x86/acpi: Fix incorrect

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

2013-07-23 Thread Tang Chen
On 07/24/2013 04:09 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:24PM +0800, Tang Chen wrote: From: Yasuaki Ishimatsu If system can create movable node which all memory of the node is allocated as ZONE_MOVABLE, setup_node_data() cannot allocate memory for the node's pg_data_t. So, use

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

2013-07-23 Thread Tang Chen
On 07/24/2013 04:02 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:23PM +0800, Tang Chen wrote: - * @offset: When a matching file is found, this is the offset to the - * beginning of the cpio. It can be used to iterate through - * the cpio to find all files inside

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

2013-07-23 Thread Tang Chen
On 07/24/2013 03:56 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:22PM +0800, Tang Chen wrote: 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

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

2013-07-23 Thread Tang Chen
On 07/24/2013 03:19 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:16PM +0800, Tang Chen wrote: /* Definition of memblock flags. */ #define MEMBLK_FLAGS_DEFAULT 0x0 /* default flag */ +#define MEMBLK_HOTPLUGGABLE0x1 /* hotpluggable region */ Given that all existing APIs

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

2013-07-23 Thread Tang Chen
On 07/24/2013 03:09 AM, Tejun Heo wrote: Hello, On Fri, Jul 19, 2013 at 03:59:15PM +0800, Tang Chen wrote: +#define MEMBLK_FLAGS_DEFAULT 0x0 /* default flag */ Please don't do this. Just clearing the struct as zero is enough. @@ -439,12 +449,14 @@ repeat: int __init_memblock

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

2013-07-23 Thread Tang Chen
On 07/24/2013 02:48 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:14PM +0800, Tang Chen wrote: 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

[PATCH 1/1 v2] x86, acpi: Fix wrong checking condition in acpi_register_lapic().

2013-07-23 Thread Tang Chen
We wanted to check if the acpi id is out of range. It should be: if (id >= MAX_LOCAL_APIC). v1 -> v2: Remove the superfluous parentheses around MAX_LOCAL_APIC. Signed-off-by: Tang Chen Reviewed-by: Len Brown --- arch/x86/kernel/acpi/boot.c |2 +- 1 file changed, 1 insertion

Re: [PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic().

2013-07-23 Thread Tang Chen
On 07/23/2013 03:39 PM, Ingo Molnar wrote: * Tang Chen wrote: We wanted to check if the acpi id is out of range. It should be: if (id>= (MAX_LOCAL_APIC)). Does this have any practical impact, or can it wait until v3.12? I haven't tested out any impact now, just found it w

Re: [PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic().

2013-07-23 Thread Tang Chen
On 07/23/2013 03:39 PM, Ingo Molnar wrote: * Tang Chentangc...@cn.fujitsu.com wrote: We wanted to check if the acpi id is out of range. It should be: if (id= (MAX_LOCAL_APIC)). Does this have any practical impact, or can it wait until v3.12? I haven't tested out any impact now,

[PATCH 1/1 v2] x86, acpi: Fix wrong checking condition in acpi_register_lapic().

2013-07-23 Thread Tang Chen
We wanted to check if the acpi id is out of range. It should be: if (id = MAX_LOCAL_APIC). v1 - v2: Remove the superfluous parentheses around MAX_LOCAL_APIC. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Len Brown len.br...@intel.com --- arch/x86/kernel/acpi/boot.c

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

2013-07-23 Thread Tang Chen
On 07/24/2013 02:48 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:14PM +0800, Tang Chen wrote: 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

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

2013-07-23 Thread Tang Chen
On 07/24/2013 03:09 AM, Tejun Heo wrote: Hello, On Fri, Jul 19, 2013 at 03:59:15PM +0800, Tang Chen wrote: +#define MEMBLK_FLAGS_DEFAULT 0x0 /* default flag */ Please don't do this. Just clearing the struct as zero is enough. @@ -439,12 +449,14 @@ repeat: int __init_memblock

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

2013-07-23 Thread Tang Chen
On 07/24/2013 03:19 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:16PM +0800, Tang Chen wrote: /* Definition of memblock flags. */ #define MEMBLK_FLAGS_DEFAULT 0x0 /* default flag */ +#define MEMBLK_HOTPLUGGABLE0x1 /* hotpluggable region */ Given that all existing APIs

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

2013-07-23 Thread Tang Chen
On 07/24/2013 03:56 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:22PM +0800, Tang Chen wrote: 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 Chentangc...@cn.fujitsu.com

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

2013-07-23 Thread Tang Chen
On 07/24/2013 04:02 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:23PM +0800, Tang Chen wrote: - * @offset: When a matching file is found, this is the offset to the - * beginning of the cpio. It can be used to iterate through - * the cpio to find all files inside

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

2013-07-23 Thread Tang Chen
On 07/24/2013 04:09 AM, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:24PM +0800, Tang Chen wrote: From: Yasuaki Ishimatsuisimatu.yasu...@jp.fujitsu.com If system can create movable node which all memory of the node is allocated as ZONE_MOVABLE, setup_node_data() cannot allocate memory

[tip:x86/apic] x86/acpi: Fix incorrect sanity check in acpi_register_lapic()

2013-07-23 Thread tip-bot for Tang Chen
Commit-ID: 82982d729319e975115d88cae4927dffb02bfea7 Gitweb: http://git.kernel.org/tip/82982d729319e975115d88cae4927dffb02bfea7 Author: Tang Chen tangc...@cn.fujitsu.com AuthorDate: Tue, 23 Jul 2013 16:00:19 +0800 Committer: Ingo Molnar mi...@kernel.org CommitDate: Tue, 23 Jul 2013 10:08

[PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic().

2013-07-22 Thread Tang Chen
We wanted to check if the acpi id is out of range. It should be: if (id >= (MAX_LOCAL_APIC)). Signed-off-by: Tang Chen --- arch/x86/kernel/acpi/boot.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c in

[PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic().

2013-07-22 Thread Tang Chen
We wanted to check if the acpi id is out of range. It should be: if (id = (MAX_LOCAL_APIC)). Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/kernel/acpi/boot.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86

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

2013-07-21 Thread Tang Chen
Hi, Forgot to mention, this patch-set is based on linux-3.10 release. Thanks. :) On 07/19/2013 03:59 PM, Tang Chen wrote: This patch-set aims to solve some problems at system boot time to enhance memory hotplug functionality. [Background] The Linux kernel cannot migrate pages used

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

2013-07-21 Thread Tang Chen
Hi, Forgot to mention, this patch-set is based on linux-3.10 release. Thanks. :) On 07/19/2013 03:59 PM, Tang Chen wrote: This patch-set aims to solve some problems at system boot time to enhance memory hotplug functionality. [Background] The Linux kernel cannot migrate pages used

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

2013-07-19 Thread Tang Chen
. Reported-by: Vasilis Liaskovitis Signed-off-by: Tang Chen --- include/linux/memblock.h |1 + include/linux/mm.h |9 + mm/memblock.c| 11 +-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/include/linux/memblock.h b/include/linux

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

2013-07-19 Thread Tang Chen
nmodified. 4) Modify other APIs to support flags, but keep their prototype unmodified. The idea is from Wen Congyang and Liu Jiang . Suggested-by: Wen Congyang Suggested-by: Liu Jiang Signed-off-by: Tang Chen --- include/linux/memblock.h |4 +++ mm/memblock

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

2013-07-19 Thread Tang Chen
} ... } Add the "continue" wherever the macro is called. (For now, it is only called in acpi_initrd_override().) The idea is from Yinghai Lu . Signed-off-by: Tang Chen Signed-off-by: Yinghai Lu --- drivers/acpi/osl.c | 18 +- 1 files changed, 13 in

[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 --- drivers/acpi/acpica/tbutils.c | 25 ++--- drivers/acpi/tables.c |2

[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 --- include/linux/memblock.h |2 ++ mm/memblock.c|6 ++ 2 files changed, 8 insertions(+), 0 deletions

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

[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 --- Documentation/kernel-parameters.txt | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/Documentation/kernel-paramet

[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 --- arch/x86/kernel/setup.c|9 ++ drivers/acpi/osl.c | 55 include

[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 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 Signed-off-by: Vasilis Liaskovitis --- arch/x86/mm/numa.c | 50 ++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git

[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 Reviewed-by: Wanpeng Li --- include/linux/memblock.h

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