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

2013-08-07 Thread Tang Chen
ust the new comments. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- lib/earlycpio.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/earlycpio.c b/lib/earlycpio.c index 7aa7ce2..c7ae5ed 100644 --- a/lib/earlycpio.c +++ b/lib/earlycpi

[PATCH v3 13/25] x86, acpi: Split acpi_boot_table_init() into two parts.

2013-08-07 Thread Tang Chen
This patch splits acpi_boot_table_init() into two steps, so that we can do each step separately in later patches. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- arch/x86/kernel/acpi/boot.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel

[PATCH v3 07/25] acpi, acpica: Split acpi_tb_parse_root_table() into two parts.

2013-08-07 Thread Tang Chen
This patch splits acpi_tb_parse_root_table() into two steps, and introduces two new functions: acpi_tb_root_table_install() and acpi_tb_root_table_override(). They are just the same as acpi_tb_parse_root_table() if they are called in sequence. Signed-off-by: Tang Chen Reviewed-by: Zhang

[PATCH v3 11/25] x86, acpi: Split acpi_table_init() into two parts.

2013-08-07 Thread Tang Chen
will keep acpi_table_init() works as before on other platforms, and we only call these new functions in Linux. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/tables.c | 26 -- include/linux/acpi.h |2 ++ 2 files changed, 22 insertions(+), 6

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

2013-08-07 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 Suggested-by: Liu Jiang Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- include/linux/memblock.

[PATCH v3 18/25] x86, acpica, acpi: Try to find SRAT in firmware earlier.

2013-08-07 Thread Tang Chen
SRAT. 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_hotp

[PATCH v3 19/25] x86, acpi, numa, mem_hotplug: Find hotpluggable memory in SRAT memory affinities.

2013-08-07 Thread Tang Chen
m is making 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

[PATCH v3 09/25] acpi, acpica: Split acpi_initialize_tables() into two parts.

2013-08-07 Thread Tang Chen
This patch splits acpi_initialize_tables() into two steps, and introduces two new functions: acpi_initialize_tables_firmware() and acpi_tb_root_table_override(), which work just the same as acpi_initialize_tables() if they are called in sequence. Signed-off-by: Tang Chen Reviewed-by: Zhang

[PATCH v3 00/25] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-07 Thread Tang Chen
le the memory allocation. 2. Change "movablecore=acpi" boot option to "movablenode" boot option. Thanks. Tang Chen (24): acpi: Print Hot-Pluggable Field in SRAT. earlycpio.c: Fix the confusing comment of find_cpio_data(). acpi: Remove "continue" in macro INVAL

[PATCH v3 15/25] x86: get pg_data_t's memory from other node

2013-08-07 Thread Tang Chen
Signed-off-by: Tang Chen Signed-off-by: Jiang Liu Reviewed-by: Wanpeng Li Reviewed-by: Zhang Yanfei Acked-by: Toshi Kani --- 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 8bf93ba..d532b6d 100644 --

[PATCH v3 20/25] x86, numa, mem_hotplug: Skip all the regions the kernel resides in.

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

[PATCH v3 22/25] memblock, mem_hotplug: Introduce MEMBLOCK_HOTPLUG flag to mark hotpluggable regions.

2013-08-07 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 | 11 +++ mm/memblock.c| 26 ++ mm

[PATCH v3 24/25] mem-hotplug: Introduce movablenode boot option to {en|dis}able using SRAT.

2013-08-07 Thread Tang Chen
s 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 Reviewed-by: Zhang Yan

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

2013-08-07 Thread Tang Chen
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

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

2013-08-07 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 Reviewed-by: Zhang Yanfei Acked-by: Tejun Heo

[PATCH v3 06/25] acpi, acpica: Call two new functions instead of acpi_tb_install_table() in acpi_tb_parse_root_table().

2013-08-07 Thread Tang Chen
acpi_tb_install_table() in acpi_tb_parse_root_table(). This will keep acpi_tb_parse_root_table() works as before. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/acpica/tbutils.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpica

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

2013-08-06 Thread Tang Chen
On 08/07/2013 07:33 AM, Toshi Kani wrote: On Fri, 2013-08-02 at 17:14 +0800, Tang Chen wrote: This patch introduce early_acpi_firmware_srat() to find the phys addr of SRAT provided by firmware. And call it in find_hotpluggable_memory(). Since we have initialized acpi_gbl_root_table_list

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

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

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

2013-08-05 Thread Tang Chen
On 08/05/2013 10:52 PM, Tejun Heo wrote: On Mon, Aug 05, 2013 at 02:22:47PM +0800, Tang Chen wrote: I have resent the v2 patch-set. Would you please give some more comments about the memblock and x86 booting code modification ? Patch 13 still seems corrupt. Is it a problem on my side maybe

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

2013-08-05 Thread Tang Chen
Hi hpa, I'm sorry but I don't quite following it. On 08/05/2013 09:07 PM, H. Peter Anvin wrote: On 08/01/2013 12:06 AM, Tang Chen wrote: This patch-set aims to solve some problems at system boot time to enhance memory hotplug functionality. [Background] The Linux kernel cann

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

2013-08-05 Thread Tang Chen
Hi Rafael, On 08/05/2013 09:26 PM, Rafael J. Wysocki wrote: .. I think I understand what you're trying to achieve and I don't have objections agaist the goal, but the matter is *how* to do that. Why don't you do something like this: (1) Introduce two new functions that will each do part of

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

2013-08-04 Thread Tang Chen
14 PM, 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, which means the kernel resides in these memory regions. Even if these memory regions are hotpluggable, we should not mark them as hotplug

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

2013-08-04 Thread Tang Chen
Hi Rafael, On 08/02/2013 09:00 PM, Rafael J. Wysocki wrote: .. This patch splits acpi_boot_table_init() into two steps: 1. Parse RSDT, which cannot be overrided, and initialize acpi_gbl_root_table_list. (step 1 + 2 above) 2. Install all ACPI tables into acpi_gbl_root_table_list. (ste

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

2013-08-04 Thread Tang Chen
Hi Rafael, On 08/02/2013 09:03 PM, Rafael J. Wysocki wrote: On Friday, August 02, 2013 05:14:26 PM Tang Chen wrote: Besides the phys addr of the acpi tables, it will be very convenient if we also have the signature of each table in acpi_gbl_root_table_list at early time. We can find SRAT

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

2013-08-02 Thread Tang Chen
m is making 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

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

2013-08-02 Thread Tang Chen
tep 1 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:

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

2013-08-02 Thread Tang Chen
for (...) { ... if (...) { ACPI_INVALID_TABLE() continue; } ... } Add the "continue" wherever the macro is called. (For now, it is only called in acpi_initrd_override().) The idea is from Yi

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

2013-08-02 Thread Tang Chen
in the subsequent patches. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei Acked-by: Toshi Kani Acked-by: Rafael J. Wysocki --- drivers/acpi/osl.c | 86 +--- 1 files changed, 61 insertions(+), 25 deletions(-) diff --git a/drivers/acpi

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

2013-08-02 Thread Tang Chen
initialize 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 Reviewed-by: Zhang Yanfei --- drivers/acpi/acpica/tbutils.c | 25 ++--- dr

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

2013-08-02 Thread Tang Chen
ust the new comments. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- lib/earlycpio.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/earlycpio.c b/lib/earlycpio.c index 7aa7ce2..c7ae5ed 100644 --- a/lib/earlycpio.c +++ b/lib/earlycpi

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

2013-08-02 Thread Tang Chen
inux 3.11-rc3. change log v1 -> v2: 1. According to Tejun's advice, make ACPI side report which memory regions are hotpluggable, and memblock side handle the memory allocation. 2. Change "movablecore=acpi" boot option to "movablenode" boot option. Thanks. Tang Chen (

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

2013-08-02 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 | 11 +++ mm/memblock.c| 26 ++ mm

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

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

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

2013-08-02 Thread Tang Chen
Signed-off-by: Tang Chen Signed-off-by: Jiang Liu Reviewed-by: Wanpeng Li Reviewed-by: Zhang Yanfei Acked-by: Toshi Kani --- 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 8bf93ba..d532b6d 100644 --

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

2013-08-02 Thread Tang Chen
SRAT. 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_hotp

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

2013-08-02 Thread Tang Chen
s 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 Reviewed-by: Zhang Yan

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

2013-08-02 Thread Tang Chen
this check 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 ecd8568..3ea4301 100644 ---

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

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

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

2013-08-02 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 Reviewed-by: Zhang Yanfei Acked-by: Tejun Heo

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

2013-08-02 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 e3621cf..af942fe 100644 --- a/drivers

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

2013-08-02 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: Zhan

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

2013-08-02 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 Suggested-by: Liu Jiang Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- include/linux/memblock.

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

2013-08-02 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 | 61 include/linux/acpi.h | 14

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

2013-08-02 Thread Tang Chen
On 08/02/2013 07:54 AM, Toshi Kani wrote: .. /* + * acpi_root_table_init - Initialize acpi_gbl_root_table_list. + * + * This function will parse RSDT or XSDT, find all tables' phys addr, + * initialize acpi_gbl_root_table_list, and record all tables' phys addr + * in acpi_gbl_root_table_lis

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

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

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 some

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(). INVALID_TABLE(

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

2013-08-01 Thread Tang Chen
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

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

2013-08-01 Thread Tang Chen
tep 1 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:

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

2013-08-01 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 Acked-by: Tejun Heo Reviewed-by: Zhang Yanfei --- drivers/acpi/osl

[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 Reviewed-by: Zhang Yanfei --- drivers/acpi/osl.c | 86 +--- 1 files changed, 61 insertions(+), 25 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 91d9f54..8df8a93

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

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

[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 Reviewed-by: Wanpeng Li Reviewed-by: Zhang Yanfei Acked-by: Tejun Heo

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

2013-08-01 Thread Tang Chen
initialize 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 Reviewed-by: Zhang Yanfei --- drivers/acpi/acpica/tbutils.c | 25 ++--- dr

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

2013-08-01 Thread Tang Chen
Signed-off-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

[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
SRAT. 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_hotp

[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 Suggested-by: Liu Jiang Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- include/linux/memblock.

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

2013-08-01 Thread Tang Chen
m is making 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

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

2013-08-01 Thread Tang Chen
this check 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 ---

[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
s 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 Reviewed-by: Zhang Yan

[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

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

2013-08-01 Thread Tang Chen
ore=acpi" boot option to "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 acp

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

[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

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 don

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

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

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

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 me

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 =&memblock.reserved; + struct memblock_region *region; + phys_addr_t start, end; + + for (i = 0; i<

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 +* inste

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

[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

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

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

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_mem

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

[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

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

[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
7;s prototype unmodified. 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 +

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

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

2013-07-19 Thread Tang Chen
patch 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 dele

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

2013-07-19 Thread Tang Chen
ggable memory info as early 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. Thank

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