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

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

[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 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 tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- include/linux/memblock.h |1 + mm/memblock.c| 18 +++--- 2 files

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

2013-08-27 Thread Tang Chen
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 tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- include/linux/memblock.h | 15

[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 tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- include/linux/memblock.h |9 - mm

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

2013-08-27 Thread Tang Chen
is 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 tangc...@cn.fujitsu.com Reviewed

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

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

[PATCH 08/11] x86, acpi, memblock: Use __memblock_alloc_base() in acpi_initrd_override()

2013-08-27 Thread Tang Chen
. 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 tangc...@cn.fujitsu.com Reviewed

[PATCH 06/11] memblock: Improve memblock to support allocation from lower address.

2013-08-27 Thread Tang Chen
This patch modifies the memblock_find_in_range_node() to support two different allocation orders. After this patch, memblock will check memblock.current_order, and decide in which order to allocate memory. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan

[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 tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- arch/x86/kernel/setup.c

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

2013-08-27 Thread Tang Chen
with virtual address. So relocate_initrd() must be done before acpi_initrd_override(). Tang Chen (11): memblock: Rename current_limit to current_limit_high in memblock. memblock: Rename memblock_set_current_limit() to memblock_set_current_limit_high(). memblock: Introduce lowest limit

[PATCH 07/11] x86, memblock: Set lowest limit for memblock_alloc_base_nid().

2013-08-27 Thread Tang Chen
if the allocation order is from low to high, they will allocate memory from the lowest limit to higher memory. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- mm/memblock.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/mm

[PATCH 01/11] memblock: Rename current_limit to current_limit_high in memblock.

2013-08-27 Thread Tang Chen
memblock.current_limit specifies the highest address that memblock could allocate. The next coming patches will introduce a lowest limit to memblock, so rename it to current_limit_high. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com

[PATCH 02/11] memblock: Rename memblock_set_current_limit() to memblock_set_current_limit_high().

2013-08-27 Thread Tang Chen
Since we renamed memblock.current_limit to current_limit_high, we also rename memblock_set_current_limit() to memblock_set_current_limit_high(). Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- arch/arm/mm/mmu.c |2

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

2013-08-23 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-23 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-23 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 0/3] x86, ACPI, mm: Cleanup for {max|low|max_low}_pfn_mapped.

2013-08-23 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-23 Thread Tang Chen
min_pfn_mapped is defined in init.c, we can also define max_pfn_mapped here. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- 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

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

2013-08-23 Thread Tang Chen
(). We could 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 h...@zytor.com Signed-off-by: Yinghai Lu ying...@kernel.org Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Cc: Rafael J. Wysocki r

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

[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
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/arch/x86

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

2013-08-21 Thread Tang Chen
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, acpi, brk: Make

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

[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 ying...@kernel.org Signed-off-by: Tang Chen tangc...@cn.fujitsu.com

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

2013-08-21 Thread Tang Chen
-by: Tang Chen tangc...@cn.fujitsu.com Tested-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/kernel/microcode_intel_early.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/microcode_intel_early.c b/arch/x86/kernel/microcode_intel_early.c index

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

2013-08-21 Thread Tang Chen
physical address to 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 ying...@kernel.org Acked-by: Tejun Heo t...@kernel.org Tested-by: Thomas Renninger tr...@suse.de Reviewed-by: Tang Chen

[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 tangc...@cn.fujitsu.com --- arch/x86/include/asm/dmi.h |2 +- arch/x86/include/asm

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

2013-08-21 Thread Tang Chen
is from Yinghai Lu ying...@kernel.org. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/kernel/setup.c |5 + drivers/acpi/osl.c | 44 ++-- include/linux/acpi.h|1 + 3 files changed, 28 insertions(+), 22 deletions(-) diff

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

2013-08-21 Thread Tang Chen
is to use BRK. We 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

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

2013-08-21 Thread Tang Chen
because it will use global variables. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- 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

[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 ying...@kernel.org Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- 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

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's

[PATCH 6/8] x86, acpi: Make acpi_initrd_override() available with va or pa.

2013-08-21 Thread Tang Chen
it will use global variables. Originally-From: Yinghai Lu ying...@kernel.org Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/kernel/setup.c |3 +- drivers/acpi/osl.c | 68 ++ include/linux/acpi.h|4 +- 3 files changed, 54

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 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 series. Hi Jiri

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 me

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 first

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

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

[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
() 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/x86/mm

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

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

[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

[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 tangc...@cn.fujitsu.com --- 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

[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 tangc...@cn.fujitsu.com --- drivers/acpi/tables.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi

[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 tangc...@cn.fujitsu.com --- 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

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

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

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

[PATCH 1/6] acpi, numa, mem_hotplug: Kill save_add_info().

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

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

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 need

[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 tangc...@cn.fujitsu.com Signed-off-by: Joe Perches j...@perches.com --- arch/x86/mm/srat.c | 17 + 1

[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 tangc...@cn.fujitsu.com Signed-off-by: Joe Perches j...@perches.com --- 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

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

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

[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

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

2013-08-14 Thread Tang Chen
, this macro is removed, and pr_err() is used like this: for (...) { ... if (...) { pr_err(ACPI OVERRIDE: ..); continue; } ... } Signed-off-by: Tang Chen tangc

[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. earlycpio.c: Fix

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

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

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

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

2013-08-14 Thread Tang Chen
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 removes the check. Signed-off-by: Tang Chen tangc

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-off-by: Tang

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, if (nid != MAX_NUMNODES nid

[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

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

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 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
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 to reorder

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 tangc...@cn.fujitsu.com --- arch/x86/kernel/setup.c |4 ++-- 1 files changed, 2 insertions(+), 2

[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 tangc...@cn.fujitsu.com AuthorDate: Wed, 14 Aug 2013 11:44:04 +0800 Committer: H. Peter Anvin h...@linux.intel.com CommitDate: Tue, 13 Aug 2013

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

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

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 with all

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