[PATCH 11/11] x86, mem_hotplug: Allocate memory near kernel image before SRAT is parsed.

2013-08-27 Thread Tang Chen
, make memblock behave as default, allocate memory from high address to low, and reset the lowest limit to 0. This behavior is controlled by movablenode boot option. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- arch/x86/kernel/setup.c | 37 + 1

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

2013-08-27 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 08/11] x86, acpi, memblock: Use __memblock_alloc_base() in acpi_initrd_override()

2013-08-27 Thread Tang Chen
w. And __memblock_alloc_base() calls memblock_alloc_base_nid(). __memblock_alloc_base() |->memblock_alloc_base_nid() |->memblock_find_in_range_node(MEMBLOCK_ALLOC_ACCESSIBLE, ...) So use __memblock_alloc_base() to allocate memory in acpi_initrd_override(). Signed-off-by: Tang Chen Reviewed-by:

[PATCH 10/11] x86, mem-hotplug: Support initialize page tables from low to high.

2013-08-27 Thread Tang Chen
controled by movablenode boot option. Since the default behavior of page tables initialization procedure is allocate page tables from top of the memory downwards, if users don't specify movablenode boot option, the kernel will behave as before. Signed-off-by: Tang Chen Reviewed-by: Zhang Y

[PATCH 04/11] memblock: Introduce memblock_set_current_limit_low() to set lower limit of memblock.

2013-08-27 Thread Tang Chen
Corresponding to memblock_set_current_limit_high(), we introduce memblock_set_current_limit_low() to set the lowest limit for memblock. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- include/linux/memblock.h |9 - mm/memblock.c|5 + 2 files changed, 13

[PATCH 05/11] memblock: Introduce allocation order to memblock.

2013-08-27 Thread Tang Chen
dress to low. So this patch introduces the allocation order to memblock. It could be used to tell memblock to allocate memory from high to low or from low to high. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- include/linux/memblock.h | 15 +++ mm/memblock.c|

[PATCH 03/11] memblock: Introduce lowest limit in memblock.

2013-08-27 Thread Tang Chen
as MEMBLOCK_ALLOC_ACCESSIBLE, memblock will use current_limit_low as the low limit of allocation. Signed-off-by: Tang Chen Reviewed-by: Zhang Yanfei --- include/linux/memblock.h |1 + mm/memblock.c| 18 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff

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

2013-08-22 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...@

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

2013-08-22 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 3/3] x86, mm: Move max_pfn_mapped definition to init.c.

2013-08-22 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 6/8] x86, acpi: Make acpi_initrd_override() available with va or pa.

2013-08-21 Thread Tang Chen
because it will use global variables. Originally-From: Yinghai Lu Signed-off-by: Tang Chen --- arch/x86/kernel/setup.c |3 +- drivers/acpi/osl.c | 68 ++ include/linux/acpi.h|4 +- 3 files changed, 54 insertions(+), 21 deletions(-)

Re: [PATCH 0/8] x86, acpi: Move acpi_initrd_override() earlier.

2013-08-21 Thread Tang Chen
Hi all, This patch-set has not been fully tested. I sent them first for you to review. Please comment if we can agree on this solution. Thanks.:) On 08/21/2013 06:15 PM, Tang Chen wrote: This patch-set aims to move acpi_initrd_override() earlier on x86. Some of the patches are from Yinghai&#

[PATCH 8/8] x86, acpi: Do acpi_initrd_override() earlier in head_32.S/head64.c.

2013-08-21 Thread Tang Chen
. Originally-From: Yinghai Lu Signed-off-by: Tang Chen --- arch/x86/include/asm/setup.h |6 + arch/x86/kernel/head64.c |4 +++ arch/x86/kernel/head_32.S|4 +++ arch/x86/kernel/setup.c | 51 - 4 files changed, 54 insertions(+), 11

[PATCH 5/8] x86, brk: Make extend_brk() available with va/pa.

2013-08-21 Thread Tang Chen
. As mentioned above, on 32bit before paging is enabled, we have to access variables with pa. So introduce a "bool is_phys" parameter to extend_brk(), and convert va to pa is it is true. Signed-off-by: Tang Chen --- arch/x86/include/asm/dmi.h |2 +- arch/x86/include/asm/setu

[PATCH 4/8] x86, acpi, brk: Extend BRK 256KB to store acpi override tables.

2013-08-21 Thread Tang Chen
idea is from Yinghai Lu . Signed-off-by: Tang Chen --- arch/x86/kernel/setup.c |5 + drivers/acpi/osl.c | 44 ++-- include/linux/acpi.h|1 + 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arc

[PATCH 0/8] x86, acpi: Move acpi_initrd_override() earlier.

2013-08-21 Thread Tang Chen
will extend BRK 256KB in this patch-set. Tang Chen (6): x86, acpi: Move table_sigs[] to stack. x86, acpi, brk: Extend BRK 256KB to store acpi override tables. x86, brk: Make extend_brk() available with va/pa. x86, acpi: Make acpi_initrd_override() available with va or pa. x86,

[PATCH 7/8] x86, acpi, brk: Make early_alloc_acpi_override_tables_buf() available with va/pa.

2013-08-21 Thread Tang Chen
is enabled because it will use global variables. Signed-off-by: Tang Chen --- arch/x86/kernel/setup.c |2 +- drivers/acpi/osl.c | 11 --- include/linux/acpi.h|2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/

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

2013-08-21 Thread Tang Chen
access global variable like boot_params. So make them take a boot_params pointer parameter so that we can pass va or pa to them. Signed-off-by: Yinghai Lu Acked-by: Tejun Heo Tested-by: Thomas Renninger Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/include/asm/setup.h |3

[PATCH 3/8] x86, acpi: Move table_sigs[] to stack.

2013-08-21 Thread Tang Chen
into pa. But for a global array, it could be too messy. So this patch move table_sigs[] to stack. Define it in acpi_initrd_override(). It is no more than 36 pointers, so it is OK to put it on stack. Originally-From: Yinghai Lu Signed-off-by: Tang Chen --- drivers/acpi/osl.c | 23

[PATCH 2/8] x86, microcode: Use get_ramdisk_{image|size}() in microcode handling.

2013-08-21 Thread Tang Chen
From: Yinghai Lu Since we made get_ramdisk_{image|size}() global, use them when we want to access ramdisk. Signed-off-by: Yinghai Lu Cc: Fenghua Yu Acked-by: Tejun Heo Tested-by: Thomas Renninger Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/kernel/microcode_intel_early.c

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

2013-08-20 Thread Tang Chen
On 08/20/2013 07:02 PM, Jiri Kosina wrote: On Thu, 20 Jun 2013, Tang Chen wrote: There is no parameter "sync" in address_space_operations->migratepage(). It should be mograte_mode. And the comment is for MIGRATE_ASYNC. I am fixing this typo in changelog :) and applying the seri

Re: [PATCH 6/6] acpi: Return -ENOENT in acpi_table_parse() and fix wrong comment.

2013-08-19 Thread Tang Chen
On 08/20/2013 03:29 AM, Toshi Kani wrote: On Fri, 2013-08-16 at 15:06 +0800, Tang Chen wrote: The comment about return value of acpi_table_parse() is incorrect. This patch fix it. Furthermore, if the table is not found, return 1 means nothing, and make it difficult to write the comment. So

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

2013-08-19 Thread Tang Chen
On 08/20/2013 07:40 AM, Rafael J. Wysocki wrote: On Wednesday, August 14, 2013 05:37:05 PM Tang Chen wrote: 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

[PATCH 4/6] acpi cleanup: Use pr_err() instead of printk() in arch/x86/mm/srat.c

2013-08-16 Thread Tang Chen
Use pr_err() instead of printk() in arch/x86/mm/srat.c Signed-off-by: Tang Chen Signed-off-by: Joe Perches --- arch/x86/mm/srat.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 591f4bb..d1e3b95 100644 --- a/arch/x86

[PATCH 3/6] acpi cleanup: Use pr_info() instead of printk() in arch/x86/mm/srat.c

2013-08-16 Thread Tang Chen
Use pr_info() instead of printk() in arch/x86/mm/srat.c. As Joe suggested, define pr_fmt(fmt) as KBUILD_MODNAME ": " fmt to prefix message with "srat: ". Signed-off-by: Tang Chen Signed-off-by: Joe Perches --- arch/x86/mm/srat.c | 17 + 1 files changed

Re: [PATCH 3/6] acpi cleanup: Use pr_info() instead of printk() in arch/x86/mm/srat.c

2013-08-16 Thread Tang Chen
Hi Joe, On 08/16/2013 03:25 PM, Joe Perches wrote: On Fri, 2013-08-16 at 15:06 +0800, Tang Chen wrote: arch/x86/mm/srat.c I think it'd be better to use pr_fmt with the conversions to pr_info and pr_err. pr_fmt can prefix the appropriate srat: and so the format strings do not ne

[PATCH 2/6] acpi, numa, mem_hotplug: Print Hot-Pluggable Field in SRAT.

2013-08-16 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/6] acpi, numa, mem_hotplug: Kill save_add_info().

2013-08-16 Thread Tang Chen
_info() is added by commit 71efa8fdc55e70ec6687c897a30759f0a2c2ad7e in 2006. And now it is useless. So this patch kill save_add_info() and the nonsense checking. Signed-off-by: Tang Chen --- arch/x86/mm/srat.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/arch/x86/mm/srat.c b/arch/x

[PATCH 0/6] acpi: Fix and cleanup in acpi.

2013-08-16 Thread Tang Chen
le is not found. And also did some cleanup. Tang Chen (6): acpi, numa, mem_hotplug: Kill save_add_info(). acpi, numa, mem_hotplug: Print Hot-Pluggable Field in SRAT. acpi cleanup: Use pr_info() instead of printk() in arch/x86/mm/srat.c acpi cleanup: Use pr_err() instead of printk() in arc

[PATCH 4/6] acpi cleanup: Use pr_err() instead of printk() in arch/x86/mm/srat.c

2013-08-16 Thread Tang Chen
Use pr_err() instead of printk() in arch/x86/mm/srat.c Signed-off-by: Tang Chen --- arch/x86/mm/srat.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 6286e89..32b9597 100644 --- a/arch/x86/mm/srat.c +++ b/arch/x86/mm

[PATCH 6/6] acpi: Return -ENOENT in acpi_table_parse() and fix wrong comment.

2013-08-16 Thread Tang Chen
The comment about return value of acpi_table_parse() is incorrect. This patch fix it. Furthermore, if the table is not found, return 1 means nothing, and make it difficult to write the comment. So return -ENOENT when the table is not found, and correct the comment. Signed-off-by: Tang Chen

[PATCH 3/6] acpi cleanup: Use pr_info() instead of printk() in arch/x86/mm/srat.c

2013-08-16 Thread Tang Chen
Use pr_info() instead of printk() in arch/x86/mm/srat.c. Signed-off-by: Tang Chen --- arch/x86/mm/srat.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 71411aa..6286e89 100644 --- a/arch/x86/mm/srat.c +++ b/arch

[PATCH 5/6] acpi: Check if @id is NULL in acpi_table_parse()

2013-08-16 Thread Tang Chen
strncmp() does not check if the params are NULL. In acpi_table_parse(), if @id is NULL, the kernel will panic. Signed-off-by: Tang Chen --- drivers/acpi/tables.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index d67a1fe

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

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

2013-08-14 Thread Tang Chen
higher memory downwards, 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 remo

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

[tip:x86/mm] x86: Use memblock_set_current_limit() to set limit for memblock.

2013-08-13 Thread tip-bot for Tang Chen
Commit-ID: 2449f343e4adc778de1c3d45b5aa14fe788663f5 Gitweb: http://git.kernel.org/tip/2449f343e4adc778de1c3d45b5aa14fe788663f5 Author: Tang Chen AuthorDate: Wed, 14 Aug 2013 11:44:04 +0800 Committer: H. Peter Anvin CommitDate: Tue, 13 Aug 2013 21:27:02 -0700 x86: Use

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

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

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

2013-08-13 Thread Tang Chen
Thanks for your 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

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: .. * 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 all

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 manag

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

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 the

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

2013-08-12 Thread Tang Chen
On 08/12/2013 10:50 PM, Tejun Heo wrote: Hello, .. I think it's in a much better shape than before but there still are a couple things bothering me. * Why can't it be opportunistic? It's silly, for example, to fail boot because ACPI tells the kernel that all memory is hotpluggable

Re: [PATCH part5 1/7] x86: get pg_data_t's memory from other node

2013-08-12 Thread Tang Chen
On 08/12/2013 10:39 PM, Tejun Heo wrote: Hello, The subject is a bit misleading. Maybe it should say "allow getting ..." rather than "get ..."? Ok, followed. On Thu, Aug 08, 2013 at 06:16:13PM +0800, Tang Chen wrote: .. I suppose the above three paragraphs ar

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

2013-08-12 Thread Tang Chen
On 08/12/2013 10:21 PM, Tejun Heo wrote: On Thu, Aug 08, 2013 at 07:09:53AM -0700, Joe Perches wrote: If you really think that the #define is better, use something like HW_ERR does and embed that #define in the pr_err. #define ACPI_OVERRIDE "ACPI OVERRIDE: " pr_err(ACPI_OVERRIDE "Tab

Re: [PATCH part2 1/4] acpi: Print Hot-Pluggable Field in SRAT.

2013-08-12 Thread Tang Chen
On 08/12/2013 10:15 PM, Tejun Heo wrote: On Thu, Aug 08, 2013 at 01:03:56PM +0800, Tang Chen wrote: + pr_info("SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]%s\n", + node, pxm, + (unsigned long long) start, (unsigned long long) end - 1, + ho

Re: [PATCH part4 2/4] x86, acpica, acpi: Try to find if SRAT is overrided earlier.

2013-08-12 Thread Tang Chen
On 08/10/2013 07:34 AM, Yinghai Lu wrote: On Fri, Aug 9, 2013 at 2:41 AM, Tang Chen wrote: On 08/09/2013 12:29 AM, Yinghai Lu wrote: .. Please check if you can reuse first half of my patchset, so find and copy override table earlier. the copied acpi tables could be near kernel code

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

2013-08-12 Thread Tang Chen
On 08/10/2013 12:32 AM, Tejun Heo wrote: Hello, On Thu, Aug 08, 2013 at 06:16:12PM +0800, Tang Chen wrote: In previous parts' patches, we have obtained SRAT earlier enough, right after memblock is ready. So this patch-set does the following things: Can you please set up a git branch wit

Re: [PATCH part4 2/4] x86, acpica, acpi: Try to find if SRAT is overrided earlier.

2013-08-09 Thread Tang Chen
On 08/09/2013 12:29 AM, Yinghai Lu wrote: .. Please check if you can reuse first half of my patchset, so find and copy override table earlier. the copied acpi tables could be near kernel code range. I don't think we need to do the finding step at that early time, in head64.c stage. Befor

Re: [PATCH] ACPI, cpu hotplug: move try_offline_node() after acpi_unmap_lsapic()

2013-08-09 Thread Tang Chen
On 08/07/2013 12:56 AM, Toshi Kani wrote: On Tue, 2013-08-06 at 19:11 +0900, Yasuaki Ishimatsu wrote: try_offline_node() checks that all cpus related with removed node have been removed by using cpu_present_bits. If all cpus related with removed node have been removed, try_offline_node() clears

Re: [PATCH] mm/hotplug: Verify hotplug memory range

2013-08-08 Thread Tang Chen
(nr_pages % PAGES_PER_SECTION) || (!nr_pages)) { + pr_err("Unsupported hotplug range: start 0x%llx, size 0x%llx\n", + start, size); I think the message here should tell users that only support range aligned to section. Others seems OK to me. Revie

Re: [PATCH part2 0/4] acpi: Trivial fix and improving for memory hotplug.

2013-08-08 Thread Tang Chen
On 08/08/2013 10:09 PM, Rafael J. Wysocki wrote: On Thursday, August 08, 2013 01:03:55 PM Tang Chen wrote: 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

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

2013-08-08 Thread Tang Chen
Hi Joe, On 08/08/2013 01:27 PM, Joe Perches wrote: On Thu, 2013-08-08 at 13:03 +0800, Tang Chen wrote: Change it to the style like other macros: #define INVALID_TABLE(x, path, name)\ do { pr_err("ACPI OVERRIDE: " x " [%s%s]

[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

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

2013-08-08 Thread Tang Chen
boot option to allow 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.

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

2013-08-08 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 part5 6/7] mem-hotplug: Introduce movablenode boot option to {en|dis}able using SRAT.

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

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

2013-08-08 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 part5 5/7] memblock, mem_hotplug: Make memblock skip hotpluggable regions by default.

2013-08-08 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 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 part4 3/4] x86, acpica, acpi: Try to find SRAT in firmware earlier.

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

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

2013-08-08 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 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 part3 2/5] x86, acpi: Split acpi_table_init() into two parts.

2013-08-08 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 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 part3 1/5] x86, acpi: Call two new functions instead of acpi_initialize_tables() in acpi_table_init().

2013-08-08 Thread Tang Chen
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
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 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 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 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 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 3/4] acpi: Remove "continue" in macro INVALID_TABLE().

2013-08-07 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 part1 0/5] acpica: Split acpi_gbl_root_table_list initialization into two parts.

2013-08-07 Thread Tang Chen
chieve this goal, we 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 interface

[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
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
ces unmodified, and 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 Che

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

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

2013-08-07 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 v3 12/25] x86, acpi: Rename check_multiple_madt() and make it global.

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

2013-08-07 Thread Tang Chen
ble() 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 inse

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

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