Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-12 Thread Tang Chen
On 08/12/2013 11:46 PM, Tejun Heo wrote: Hello, On Mon, Aug 12, 2013 at 11:41:25PM +0800, Tang Chen wrote: Then there is no way to tell the users which memory is hotpluggable. phys addr is not user friendly. For users, node or memory device is the best. The firmware should arrange

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-12 Thread Tang Chen
On 08/12/2013 11:23 PM, Tejun Heo wrote: Hello, On Mon, Aug 12, 2013 at 08:14:04AM -0700, H. Peter Anvin wrote: It gets really messy if it is advisory. Suddenly you have the user thinking they can hotswap a memory bank and they just can't. I'm very skeptical that not doing the strict

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-12 Thread Tang Chen
Hi tj, On 08/13/2013 12:22 AM, Tejun Heo wrote: Hello, Tang. On Tue, Aug 13, 2013 at 12:19:02AM +0800, Tang Chen wrote: The kernel can export info to users. The point is what kind of info. Exporting phys addr is meaningless, of course. Now in /sys, we only have memory_block and node

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-12 Thread Tang Chen
On 08/13/2013 12:46 AM, Tejun Heo wrote: Hello, Tang. .. But, different users have different ways to use memory hotplug. Hotswaping any particular chunk of memory is the goal we will reach finally. But it is on specific hardware. In most current machines, we can use movable node to

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-13 Thread Tang Chen
On 08/13/2013 12:46 AM, Tejun Heo wrote: .. * Adding an option to tell the kernel to try to stay away from hotpluggable nodes is fine. I have no problem with that at all. * The patchsets upto this point have been somehow trying to reorder operations shomehow such that *no* memory

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-13 Thread Tang Chen
ur patient and help. :) On 08/13/2013 02:14 PM, Tang Chen wrote: On 08/13/2013 12:46 AM, Tejun Heo wrote: .. * Adding an option to tell the kernel to try to stay away from hotpluggable nodes is fine. I have no problem with that at all. * The patchsets upto this point have been somehow trying

Re: [PATCH part1 0/5] acpica: Split acpi_gbl_root_table_list initialization into two parts.

2013-08-13 Thread Tang Chen
Hi Bob, Rafael, I think these patches are unnecessary now. mm guys have decided to do memory hotplug in another way, an easier way that we don't need to touch ACPICA code. So please ignore this patch-set. Thanks for the help and suggestions. :) On 08/08/2013 11:39 AM, Tang Chen wrote

[PATCH] x86: Use memblock_set_current_limit() to set limit for memblock.

2013-08-13 Thread Tang Chen
In setup_arch() of x86, it set memblock.current_limit directly. We should use memblock_set_current_limit(). If the implementation is changed, it is easy to maintain. Signed-off-by: Tang Chen --- arch/x86/kernel/setup.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 3/3] acpi: Kill macro INVALID_TABLE().

2013-08-14 Thread Tang Chen
o after this patch, this macro is removed, and pr_err() is used like this: for (...) { ... if (...) { pr_err("ACPI OVERRIDE: .."); continue; } ... } Sig

[PATCH 0/3] Preparation for arranging hotplug memory in ZONE_MOVABLE.

2013-08-14 Thread Tang Chen
These three trivial patches are from patch-set "Arrange hotpluggable memory as ZONE_MOVABLE." And they have been acked and reviewed by many people. Hope they can be merged first. And the rest patches are coming soon. Tang Chen (3): acpi: Print Hot-Pluggable Field in SRAT. earlyc

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

2013-08-14 Thread Tang Chen
ust the new comments. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei Reviewed-by: Tejun Heo --- 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/

[PATCH 1/3] acpi: Print Hot-Pluggable Field in SRAT.

2013-08-14 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 1/1] memblock cleanup: Remove unnecessary check in memblock_find_in_range_node()

2013-08-14 Thread Tang Chen
nwards, if this_end < size, we can break because the rest memory will all under size. It won't satisfy us ang more. Furthermore, we don't need to check "if (this_end < size)" actually. Without this confusing check, we only waste some loops. So this patch removes the check. Signed-off-

Re: [PATCH 1/1] memblock cleanup: Remove unnecessary check in memblock_find_in_range_node()

2013-08-14 Thread Tang Chen
On 08/15/2013 11:27 AM, Tejun Heo wrote: Hello, Tang. On Thu, Aug 15, 2013 at 11:23:19AM +0800, Tang Chen wrote: Furthermore, we don't need to check "if (this_end< size)" actually. Without this confusing check, we only waste some loops. So this patch removes the check. Signed

Re: [PATCH part5 5/7] memblock, mem_hotplug: Make memblock skip hotpluggable regions by default.

2013-08-14 Thread Tang Chen
On 08/15/2013 05:54 AM, Naoya Horiguchi wrote: > On Thu, Aug 08, 2013 at 06:16:17PM +0800, Tang Chen wrote: >> --- a/mm/memblock.c >> +++ b/mm/memblock.c > ... >> @@ -719,6 +723,10 @@ void __init_memblock __next_free_mem_range_rev(u64 >> *idx, int nid, >>

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tang Chen
Hi Wanpeng On 08/28/2013 04:03 PM, Wanpeng Li wrote: Hi Tang, .. [About this patch-set] So this patch-set does the following: 1. Make memblock be able to allocate memory from low address to high address. I want to know if there is fragmentation degree difference here? Before this

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tang Chen
On 08/28/2013 11:19 PM, Tejun Heo wrote: .. Doesn't apply to -master, -next or tip. Again, can you please include which tree and git commit the patches are against in the patch description? How is one supposed to know on top of which tree you're working? It is in your benefit to make

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tang Chen
Hi Wanpeng, On 08/29/2013 09:36 AM, Wanpeng Li wrote: .. Hi tj, Sorry for the trouble. Please refer to the following branch: https://github.com/imtangchen/linux.git movablenode-boot-option Could you post your testcase? So I can test it on x86 and powerpc machines. Sure. Some simple

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-01 Thread Tang Chen
Hi guys, Any comment to this patch-set ? And shall agree on using this solution suggested by Tejun ? Thanks. On 08/27/2013 05:37 PM, Tang Chen wrote: This patch-set is based on tj's suggestion, and not fully tested. Just for review and discussion. [Problem] The current Linux cannot

[PATCH RESEND 2/3] x86, mm: Update min_pfn_mapped in add_pfn_range_mapped().

2013-09-02 Thread Tang Chen
We can also update min_pfn_mapped in add_pfn_range_mapped(). Signed-off-by: Tang Chen --- arch/x86/mm/init.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 5b2eaca..a97749f 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init

[PATCH RESEND 0/3] x86, ACPI, mm: Cleanup for {max|low|max_low}_pfn_mapped.

2013-09-02 Thread Tang Chen
This patch-set does the following: 1. Kill max_low_pfn_mapped as it is useless. This patch is from Yinghai. 2. Update min_pfn_mapped and max_pfn_mapped together in add_pfn_range_mapped(). 3. Move definition of max_pfn_mapped tp init.c together with min_pfn_mapped. Tang Chen (2): x86, mm

[PATCH RESEND 3/3] x86, mm: Move max_pfn_mapped definition to init.c.

2013-09-02 Thread Tang Chen
min_pfn_mapped is defined in init.c, we can also define max_pfn_mapped here. Signed-off-by: Tang Chen --- arch/x86/kernel/setup.c |8 arch/x86/mm/init.c |9 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel

[PATCH RESEND 1/3] x86, ACPI, mm: Kill max_low_pfn_mapped.

2013-09-02 Thread Tang Chen
change to use 1U<<(32_PAGE_SHIFT) with it, aka under 4G. -v2: Leave alone max_low_pfn_mapped in i915 code according to tj. Suggested-by: H. Peter Anvin Signed-off-by: Yinghai Lu Signed-off-by: Tang Chen Cc: "Rafael J. Wysocki" Cc: Jacob Shin Cc: Pekka Enberg Cc: linux-a...@

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

[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 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 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 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 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 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 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 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 Reviewed-by: Zhang Yanfei --- drivers/acpi/acpica/tbutils.c | 25 ++--- drivers/acpi

[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 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 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
} ... } 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 18/18] x86, numa, acpi, memory-hotplug: Make movablenode have higher priority.

2013-08-01 Thread Tang Chen
tpluggable 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 Reviewed-by: Zh

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

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

2013-08-07 Thread Tang Chen
tpluggable 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 Reviewed-by: Zh

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

2013-08-07 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 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 15/25] x86: get pg_data_t's memory from other node

2013-08-07 Thread Tang Chen
-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 --- a/arch/x86/mm

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

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

2013-08-07 Thread Tang Chen
t;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 INVALID_TABLE(). acpi: Introduce acpi_verif

[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 21/25] memblock, numa: Introduce flag into memblock.

2013-08-07 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 v3 18/25] x86, acpica, acpi: Try to find SRAT in firmware earlier.

2013-08-07 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 v3 19/25] x86, acpi, numa, mem_hotplug: Find hotpluggable memory in SRAT memory affinities.

2013-08-07 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 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
. This 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 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 05/25] acpi, acpica: Split acpi_tb_install_table() into two parts.

2013-08-07 Thread Tang Chen
into two steps, and introduce two new functions: acpi_tb_install_table_firmware() and acpi_tb_install_table_override(), which will be used later in Linux. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/acpica/tbutils.c | 118 +++- 1 files changed, 103 insertion

[PATCH v3 10/25] x86, acpi: Call two new functions instead of acpi_initialize_tables() in acpi_table_init().

2013-08-07 Thread Tang Chen
in acpi_table_init(). Since acpi_table_init() is also used in ia64, we keep it works as before. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/tables.c |5 - include/acpi/acpixf.h |4 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/tables.c

[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 04/25] acpi: Introduce acpi_verify_initrd() to check if a table is invalid.

2013-08-07 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 v3 17/25] x86, acpica, acpi: Try to find if SRAT is overrided earlier.

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

[PATCH v3 14/25] x86, acpi: Initialize acpi golbal root table list earlier.

2013-08-07 Thread Tang Chen
block from allocating hotpluggable memory for the kernel. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- arch/x86/kernel/acpi/boot.c | 30 +- arch/x86/kernel/setup.c |8 +++- include/linux/acpi.h|1 + 3 files changed, 25 inserti

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

2013-08-07 Thread Tang Chen
o after this patch, this macro should be used like this: 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 v3 08/25] acpi, acpica: Call two new functions instead of acpi_tb_parse_root_table() in acpi_initialize_tables().

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

[PATCH v3 23/25] memblock, mem_hotplug: Make memblock skip hotpluggable regions by default.

2013-08-07 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 ecd8568..3ea4301 100644 --- a/mm/memblock.c +++

[PATCH v3 12/25] x86, acpi: Rename check_multiple_madt() and make it global.

2013-08-07 Thread Tang Chen
in acpi_boot_table_init() in x86. This patch make check_multiple_madt() global, and rename it to acpi_check_multiple_madt() because all interfaces provided by drivers/acpi/tables.c begins with "acpi_". Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/tables.c |4 ++-

[PATCH v3 16/25] x86: Make get_ramdisk_{image|size}() global.

2013-08-07 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 part1 3/5] 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 part1 5/5] 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 part1 4/5] acpi, acpica: Call two new functions instead of acpi_tb_parse_root_table() in acpi_initialize_tables().

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

[PATCH part1 0/5] acpica: Split acpi_gbl_root_table_list initialization into two parts.

2013-08-07 Thread Tang Chen
have to split all the following functions: ACPICA: acpi_tb_install_table() acpi_tb_parse_root_table() acpi_initialize_tables() Linux acpi: acpi_table_init() acpi_boot_table_init() Since ACPICA code is not just used by the Linux, so we should keep the ACPICA side interfaces unmodified, and in

[PATCH part1 2/5] acpi, acpica: Call two new functions instead of acpi_tb_install_table() in acpi_tb_parse_root_table().

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

[PATCH part1 1/5] acpi, acpica: Split acpi_tb_install_table() into two parts.

2013-08-07 Thread Tang Chen
introduce new functions used in Linux. This patch split acpi_tb_install_table() into two steps, and introduce two new functions: acpi_tb_install_table_firmware() and acpi_tb_install_table_override(), which will be used later in Linux. Signed-off-by: Tang Chen Reviewed-by: Zhan

[PATCH part2 3/4] acpi: Remove "continue" in macro INVALID_TABLE().

2013-08-07 Thread Tang Chen
o after this patch, this macro should be used like this: 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 part2 0/4] acpi: Trivial fix and improving for memory hotplug.

2013-08-07 Thread Tang Chen
This patch-set does some trivial fix and improving in ACPI code for memory hotplug. Patch 1,3,4 have been acked. Tang Chen (4): acpi: Print Hot-Pluggable Field in SRAT. earlycpio.c: Fix the confusing comment of find_cpio_data(). acpi: Remove "continue" in macro INVALID_TABLE

[PATCH part2 1/4] 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 part2 4/4] acpi: Introduce acpi_verify_initrd() to check if a table is invalid.

2013-08-07 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/osl.c

[PATCH part2 2/4] 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 part3 0/5] acpi, acpica: Initialize acpi_gbl_root_table_list earlier and override it later.

2013-08-08 Thread Tang Chen
s in initrd, |and store them in acpi_tables_addr array. */ |.. |->acpi_boot_table_init() /* Check acpi_tables_addr, if any table needs to be overrided, override it. */ Tang Chen (5): x86, acp

[PATCH part3 5/5] x86, acpi: Initialize acpi golbal root table list earlier.

2013-08-08 Thread Tang Chen
block from allocating hotpluggable memory for the kernel. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- arch/x86/kernel/acpi/boot.c | 30 +- arch/x86/kernel/setup.c |8 +++- include/linux/acpi.h|1 + 3 files changed, 25 inserti

[PATCH part3 1/5] x86, acpi: Call two new functions instead of acpi_initialize_tables() in acpi_table_init().

2013-08-08 Thread Tang Chen
in acpi_table_init(). Since acpi_table_init() is also used in ia64, we keep it works as before. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/tables.c |5 - include/acpi/acpixf.h |4 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/acpi

[PATCH part3 3/5] x86, acpi: Rename check_multiple_madt() and make it global.

2013-08-08 Thread Tang Chen
in acpi_boot_table_init() in x86. This patch make check_multiple_madt() global, and rename it to acpi_check_multiple_madt() because all interfaces provided by drivers/acpi/tables.c begins with "acpi_". Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- drivers/acpi/tables.c |4 ++-

[PATCH part3 2/5] x86, acpi: Split acpi_table_init() into two parts.

2013-08-08 Thread Tang Chen
. This 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 part3 4/5] x86, acpi: Split acpi_boot_table_init() into two parts.

2013-08-08 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 part4 4/4] x86, acpi, numa, mem_hotplug: Find hotpluggable memory in SRAT memory affinities.

2013-08-08 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 part4 2/4] x86, acpica, acpi: Try to find if SRAT is overrided earlier.

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

[PATCH part4 0/4] Parse SRAT memory affinities earlier.

2013-08-08 Thread Tang Chen
. 3. Parse all memory affinities in SRAT, and find all hotpluggable memory. In later patches, we will improve memblock to mark and skip hotpluggable memory when allocating memory. Tang Chen (4): x86: Make get_ramdisk_{image|size}() global. x86, acpica, acpi: Try to find if SRAT is overrided e

[PATCH part4 3/4] x86, acpica, acpi: Try to find SRAT in firmware earlier.

2013-08-08 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 part4 1/4] x86: Make get_ramdisk_{image|size}() global.

2013-08-08 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 part5 4/7] memblock, mem_hotplug: Introduce MEMBLOCK_HOTPLUG flag to mark hotpluggable regions.

2013-08-08 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 part5 7/7] x86, numa, acpi, memory-hotplug: Make movablenode have higher priority.

2013-08-08 Thread Tang Chen
tpluggable 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 Reviewed-by: Zh

[PATCH part5 5/7] memblock, mem_hotplug: Make memblock skip hotpluggable regions by default.

2013-08-08 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 ecd8568..3ea4301 100644 --- a/mm/memblock.c +++

[PATCH part5 6/7] mem-hotplug: Introduce movablenode boot option to {en|dis}able using SRAT.

2013-08-08 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 part5 1/7] x86: get pg_data_t's memory from other node

2013-08-08 Thread Tang Chen
-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 --- a/arch/x86/mm

[PATCH part5 3/7] memblock, numa: Introduce flag into memblock.

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

2013-08-08 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 | 42 ++ 1 files

[PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-08 Thread Tang Chen
llow users to enable/disable this functionality. Tang Chen (6): x86, numa, mem_hotplug: Skip all the regions the kernel resides in. memblock, numa: Introduce flag into memblock. memblock, mem_hotplug: Introduce MEMBLOCK_HOTPLUG flag to mark hotpluggable regions. memblock, mem_hot

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