Re: [RFC] COLO Proxy Module

2015-07-01 Thread Wen Congyang
est extension ID in order to > allocate space for the offsets. So if we want to add a new extension, we should post the module too. Is it right? Thanks Wen Congyang > >> in order to support COLO-Proxy, i need a extra nf_ct_ext_id called >> "NF_CT_EXT_COLO" >> t

Re: [PATCH v5 14/14] memory-hotplug: free node_data when a node is offlined

2012-12-29 Thread Wen Congyang
At 12/28/2012 08:28 AM, Kamezawa Hiroyuki Wrote: > (2012/12/27 21:16), Wen Congyang wrote: >> At 12/26/2012 11:55 AM, Kamezawa Hiroyuki Wrote: >>> (2012/12/24 21:09), Tang Chen wrote: >>>> From: Wen Congyang >>>> >>>> We call hotadd_ne

Re: [PATCH v5 01/14] memory-hotplug: try to offline the memory twice to avoid dependence

2012-12-29 Thread Wen Congyang
At 12/25/2012 04:35 PM, Glauber Costa Wrote: > On 12/24/2012 04:09 PM, Tang Chen wrote: >> From: Wen Congyang >> >> memory can't be offlined when CONFIG_MEMCG is selected. >> For example: there is a memory device on node 1. The address range >> is [1G,

Re: [PATCH v5 01/14] memory-hotplug: try to offline the memory twice to avoid dependence

2012-12-29 Thread Wen Congyang
At 12/26/2012 11:02 AM, Kamezawa Hiroyuki Wrote: > (2012/12/24 21:09), Tang Chen wrote: >> From: Wen Congyang >> >> memory can't be offlined when CONFIG_MEMCG is selected. >> For example: there is a memory device on node 1. The address range >> is [1G,

Re: [PATCH v5 14/14] memory-hotplug: free node_data when a node is offlined

2012-12-27 Thread Wen Congyang
At 12/26/2012 11:55 AM, Kamezawa Hiroyuki Wrote: > (2012/12/24 21:09), Tang Chen wrote: >> From: Wen Congyang >> >> We call hotadd_new_pgdat() to allocate memory to store node_data. So we >> should free it when removing a node. >> >> Signed-off-by: Wen Con

Re: [PATCH] X86/acpi: remove redundant logic of acpi memory hotadd

2012-12-07 Thread Wen Congyang
ppears I don't know if a real hardware uses this way to remove memory device. >> - >> -if (acpi_memory_enable_device(mem_device)) { >> -printk(KERN_ERR PREFIX "Cannot enable memory device\n"); >> -break; &

Re: [Patch v4 08/12] memory-hotplug: remove memmap of sparse-vmemmap

2012-11-29 Thread Wen Congyang
At 11/28/2012 05:40 PM, Jianguo Wu Wrote: > Hi Congyang, > > I think vmemmap's pgtable pages should be freed after all entries are > cleared, I have a patch to do this. > The code logic is the same as [Patch v4 09/12] memory-hotplug: remove page > table of x86_64 architecture. > > How do you th

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-28 Thread Wen Congyang
At 11/28/2012 04:28 PM, Jiang Liu Wrote: > On 2012-11-28 16:29, Wen Congyang wrote: >> At 11/28/2012 12:08 PM, Jiang Liu Wrote: >>> On 2012-11-28 11:24, Bob Liu wrote: >>>> On Tue, Nov 27, 2012 at 8:49 PM, Tang Chen wrote: >>>>> On 11/27/2012 08:09 PM

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-28 Thread Wen Congyang
_declare_contiguous(NULL, selected_size, 0, limit); >> + if (cma_size_cmdline != -1) >> + dma_declare_contiguous(NULL, selected_size, >> cma_start_cmdline, limit); >> + else >> + dma_declare_contigu

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-27 Thread Wen Congyang
ameters.txt. >> >> Thanks. :) > On one other OS, there is a mechanism to dynamically convert pages from > movable zones into normal zones. The OS auto does it? Or the user coverts it? We can convert pages from movable zones into normal zones by the following interface: ec

[Patch v4 02/12] memory-hotplug: check whether all memory blocks are offlined or not when removing memory

2012-11-27 Thread Wen Congyang
ohiro Signed-off-by: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- drivers/base/memory.c | 6 ++ include/linux/memory_hotplug.h | 1 + mm/memory_hotplug.c| 47 ++ 3 files changed, 54 insertions(+) diff --git a/drivers/base/memor

[Patch v4 07/12] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

2012-11-27 Thread Wen Congyang
: register_page_bootmem_memmap() is not implemented for ia64, ppc, s390, and sparc. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro Signed-off-by: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- arch/ia64/mm/discontig.c | 6

[Patch v4 00/12] memory-hotplug: hot-remove physical memory

2012-11-27 Thread Wen Congyang
when a node is offlined Wen Congyang (6): memory-hotplug: try to offline the memory twice to avoid dependence memory-hotplug: remove redundant codes memory-hotplug: introduce new function arch_remove_memory() for removing page table depends on architecture memory-hotplug: remove page

[Patch v4 01/12] memory-hotplug: try to offline the memory twice to avoid dependence

2012-11-27 Thread Wen Congyang
primary memory block. 2nd iterate: offline primary (i.e. first added) memory block. This idea is suggested by KOSAKI Motohiro. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu Signed-off-b

[Patch v4 04/12] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2012-11-27 Thread Wen Congyang
bootmem. So the patch makes memory leak. But I think the memory leak size is very samll. And it does not affect the system. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro Signed-off-by: Wen Congyang Signed

[Patch v4 03/12] memory-hotplug: remove redundant codes

2012-11-27 Thread Wen Congyang
Ishimatsu Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 101 1 file changed, 55 insertions(+), 46 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index b6d1101..6d06488 100644 --- a/mm/memory_hotplug.c +++ b/mm

[Patch v4 10/12] memory-hotplug: memory_hotplug: clear zone when removing the memory

2012-11-27 Thread Wen Congyang
Len Brown CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 207 1 file changed, 207 insertions(+) diff --git a/mm/memory_h

[Patch v4 06/12] memory-hotplug: unregister memory section on SPARSEMEM_VMEMMAP

2012-11-27 Thread Wen Congyang
: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index e741732

[Patch v4 11/12] memory-hotplug: remove sysfs file of node

2012-11-27 Thread Wen Congyang
: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 8 +- include/linux/memory_hotplug.h | 2 +- mm/memory_hotplug.c| 58 -- 3 files changed, 64

[Patch v4 09/12] memory-hotplug: remove page table of x86_64 architecture

2012-11-27 Thread Wen Congyang
Ishimatsu Signed-off-by: Wen Congyang Signed-off-by: Jianguo Wu Signed-off-by: Jiang Liu --- arch/x86/include/asm/pgtable_types.h | 1 + arch/x86/mm/init_64.c| 231 +++ arch/x86/mm/pageattr.c | 47 +++ 3 files changed, 257

[Patch v4 08/12] memory-hotplug: remove memmap of sparse-vmemmap

2012-11-27 Thread Wen Congyang
-by: Yasuaki Ishimatsu Signed-off-by: Jianguo Wu Signed-off-by: Wen Congyang --- arch/ia64/mm/discontig.c | 8 arch/powerpc/mm/init_64.c | 8 arch/s390/mm/vmem.c | 8 arch/sparc/mm/init_64.c | 8 arch/x86/mm/init_64.c | 119

[Patch v4 12/12] memory-hotplug: free node_data when a node is offlined

2012-11-27 Thread Wen Congyang
: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 449663e..d1451ab 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1309,9 +1309,12

[Patch v4 05/12] memory-hotplug: introduce new function arch_remove_memory() for removing page table depends on architecture

2012-11-27 Thread Wen Congyang
t for s390). CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- arch/ia64/mm/init.c

Re: [PATCH v2 0/5] Add movablecore_map boot option

2012-11-27 Thread Wen Congyang
lecore_map is more flexible. > > ... but *much* harder for users, so movable_node is better in most cases. But numa is initialized very later, and we need the information in SRAT... Thanks Wen Congyang > > -hpa > > -- To unsubscribe from this list: send the line "

Re: [PATCH v3 08/12] memory-hotplug: remove memmap of sparse-vmemmap

2012-11-26 Thread Wen Congyang
At 11/27/2012 01:47 PM, Jianguo Wu Wrote: > On 2012/11/1 17:44, Wen Congyang wrote: > >> From: Yasuaki Ishimatsu >> >> All pages of virtual mapping in removed memory cannot be freed, since some >> pages >> used as PGD/PUD includes not only removed memo

Re: [PATCH v3 08/12] memory-hotplug: remove memmap of sparse-vmemmap

2012-11-26 Thread Wen Congyang
At 11/27/2012 01:47 PM, Jianguo Wu Wrote: > On 2012/11/1 17:44, Wen Congyang wrote: > >> From: Yasuaki Ishimatsu >> >> All pages of virtual mapping in removed memory cannot be freed, since some >> pages >> used as PGD/PUD includes not only removed memo

Re: mm/vmemmap: fix wrong use of virt_to_page

2012-11-26 Thread Wen Congyang
->lru.next; > @@ -710,13 +711,10 @@ static void free_section_usemap(struct page *memmap, > unsigned long *usemap) >*/ > > if (memmap) { > - struct page *memmap_page; > - memmap_page = virt_to_page(memmap); > - > nr_pag

Re: [PATCH v2 5/5] page_alloc: Bootmem limit with movablecore_map

2012-11-26 Thread Wen Congyang
be classified as a non-RAM type in memblock. What do you want to say? We don't save type in memblock because we only add E820_RAM and E820_RESERVED_KERN to memblock. Thanks Wen Congyang > > -hpa > > -- To unsubscribe from this list: send the line "unsubscribe linux-ke

Re: [PATCH v2 5/5] page_alloc: Bootmem limit with movablecore_map

2012-11-26 Thread Wen Congyang
At 11/27/2012 11:22 AM, Jianguo Wu Wrote: > On 2012/11/27 11:19, Wen Congyang wrote: > >> At 11/27/2012 08:58 AM, Jianguo Wu Wrote: >>> On 2012/11/26 23:48, H. Peter Anvin wrote: >>> >>>> On 11/26/2012 05:15 AM, Tang Chen wrote: >>>>> >&

Re: [PATCH v2 5/5] page_alloc: Bootmem limit with movablecore_map

2012-11-26 Thread Wen Congyang
served.regions contain two type memory: bootmem and movable memory. We will put all pages not in reserved.regions into buddy system. If we put movable memory in reserved.regions, we have no chance to put them to buddy system, and can't use them after system boots. Thanks Wen Congy

Re: [PATCH v3 11/12] memory-hotplug: remove sysfs file of node

2012-11-26 Thread Wen Congyang
At 11/26/2012 10:27 PM, Jianguo Wu Wrote: > On 2012/11/1 17:44, Wen Congyang wrote: >> This patch introduces a new function try_offline_node() to >> remove sysfs file of node when all memory sections of this >> node are removed. If some memory sections of this node are

[PATCH 4/5] cpu-hotplug,memory-hotplug: clear cpu_to_node() when offlining the node

2012-11-26 Thread Wen Congyang
: Andrew Morton Cc: Mel Gorman Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Tang Chen Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/mm/memory_hotp

[PATCH 3/5] cpu-hotplug, memory-hotplug: try offline the node when hotremoving a cpu

2012-11-26 Thread Wen Congyang
: Ingo Molnar Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Tang Chen Signed-off-by: Wen Congyang --- drivers/acpi/processor_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index a4352b8..7fc728c7 10

[PATCH 5/5] Do not use cpu_to_node() to find an offlined cpu's node.

2012-11-26 Thread Wen Congyang
f-by: Tang Chen Signed-off-by: Wen Congyang --- kernel/sched/core.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 2d8927f..4e6404e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @

[PATCH 0/5] cpu-hotplug,memory-hotplug: bug fix for offlining node

2012-11-26 Thread Wen Congyang
This patchset is based on the following patchset: https://lkml.org/lkml/2012/11/1/93 The following patch in mm tree can be dropped now: cpu_hotplug-unmap-cpu2node-when-the-cpu-is-hotremoved.patch Tang Chen (1): Do not use cpu_to_node() to find an offlined cpu's node. Wen Congya

[PATCH 1/5] cpu_hotplug: clear apicid to node when the cpu is hotremoved

2012-11-26 Thread Wen Congyang
rs apicid-to-node mapping when the cpu is hotremoved. Cc: Yasuaki Ishimatsu Cc: David Rientjes Cc: Jiang Liu Cc: Minchan Kim Cc: KOSAKI Motohiro Cc: Andrew Morton Cc: Mel Gorman Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Tang Chen Signed-off

[PATCH 2/5] memory-hotplug: export the function try_offline_node()

2012-11-26 Thread Wen Congyang
KOSAKI Motohiro Cc: Andrew Morton Cc: Mel Gorman Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Tang Chen Signed-off-by: Wen Congyang --- include/linux/memory_hotplug.h | 2 ++ mm/memory_hotplug.c| 3 ++- 2 files changed, 4 insertion

[PATCH] memory: fix the argument passed to sync_alobal_pgds()

2012-11-26 Thread Wen Congyang
Anvin" Signed-off-by: Wen Congyang --- arch/x86/mm/init_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 3baff25..df50b43 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -60

Re: [RFC PATCH v3 3/3] acpi_memhotplug: Allow eject to proceed on rebind scenario

2012-11-26 Thread Wen Congyang
At 11/26/2012 04:36 PM, Vasilis Liaskovitis Wrote: > On Sun, Nov 25, 2012 at 12:20:47AM +0800, Wen Congyang wrote: >> At 2012/11/24 1:50, Vasilis Liaskovitis Wrote: >>> Consider the following sequence of operations for a hotplugged memory >>> device: >>> >

Re: [RFC PATCH v3 2/3] acpi_memhotplug: Add prepare_remove operation

2012-11-24 Thread Wen Congyang
ry. This is in compliance with normal > unbind driver core semantics, see the discussion in v2 of this patchset: > https://lkml.org/lkml/2012/11/16/649 If we don't remove it when unbinding it, it may cause kernel panicked. I have explained in another mail. Thanks Wen Congyang > > Af

Re: [RFC PATCH v3 3/3] acpi_memhotplug: Allow eject to proceed on rebind scenario

2012-11-24 Thread Wen Congyang
ct If we don't offline/remove the memory, we have no chance to do it in step 2. After step2, the memory is used by the kernel, but we have powered off it. It is very dangerous. So this patch is unnecessary now. Thanks Wen Congyang > > Setting the enabled bit in this case (in acpi_m

Re: [PATCH v3 06/12] memory-hotplug: unregister memory section on SPARSEMEM_VMEMMAP

2012-11-20 Thread Wen Congyang
At 11/21/2012 01:03 PM, Jaegeuk Hanse Wrote: > On 11/21/2012 12:42 PM, Wen Congyang wrote: >> At 11/21/2012 12:22 PM, Jaegeuk Hanse Wrote: >>> On 11/21/2012 11:05 AM, Wen Congyang wrote: >>>> At 11/20/2012 07:16 PM, Jaegeuk Hanse Wrote: >>>>> On 11/01/2

Re: [PATCH v3 06/12] memory-hotplug: unregister memory section on SPARSEMEM_VMEMMAP

2012-11-20 Thread Wen Congyang
At 11/21/2012 01:03 PM, Jaegeuk Hanse Wrote: > On 11/21/2012 12:42 PM, Wen Congyang wrote: >> At 11/21/2012 12:22 PM, Jaegeuk Hanse Wrote: >>> On 11/21/2012 11:05 AM, Wen Congyang wrote: >>>> At 11/20/2012 07:16 PM, Jaegeuk Hanse Wrote: >>>>> On 11/01/2

Re: [PATCH v3 06/12] memory-hotplug: unregister memory section on SPARSEMEM_VMEMMAP

2012-11-20 Thread Wen Congyang
At 11/21/2012 12:22 PM, Jaegeuk Hanse Wrote: > On 11/21/2012 11:05 AM, Wen Congyang wrote: >> At 11/20/2012 07:16 PM, Jaegeuk Hanse Wrote: >>> On 11/01/2012 05:44 PM, Wen Congyang wrote: >>>> From: Yasuaki Ishimatsu >>>> >>>> Currently __

Re: [PART4 Patch v2 1/2] numa: add CONFIG_MOVABLE_NODE for movable-dedicated node

2012-11-20 Thread Wen Congyang
At 11/21/2012 06:25 AM, Andrew Morton Wrote: > On Fri, 16 Nov 2012 19:58:09 +0800 > Wen Congyang wrote: > >> From: Lai Jiangshan >> >> All are prepared, we can actually introduce N_MEMORY. >> add CONFIG_MOVABLE_NODE make we can use it for movable-dedicated node

Re: [PATCH v3 06/12] memory-hotplug: unregister memory section on SPARSEMEM_VMEMMAP

2012-11-20 Thread Wen Congyang
At 11/20/2012 07:16 PM, Jaegeuk Hanse Wrote: > On 11/01/2012 05:44 PM, Wen Congyang wrote: >> From: Yasuaki Ishimatsu >> >> Currently __remove_section for SPARSEMEM_VMEMMAP does nothing. But >> even if >> we use SPARSEMEM_VMEMMAP, we can unregister the memor

Re: [PATCH v3 06/12] memory-hotplug: unregister memory section on SPARSEMEM_VMEMMAP

2012-11-20 Thread Wen Congyang
At 11/20/2012 02:58 PM, Jaegeuk Hanse Wrote: > On 11/20/2012 02:55 PM, Wen Congyang wrote: >> At 11/20/2012 02:22 PM, Jaegeuk Hanse Wrote: >>> On 11/01/2012 05:44 PM, Wen Congyang wrote: >>>> From: Yasuaki Ishimatsu >>>> >>>> Currently __

Re: [PATCH v3 11/12] memory-hotplug: remove sysfs file of node

2012-11-20 Thread Wen Congyang
ot for pm tree, so I don't apply the patchset in pm tree before generating this patchset. Thanks Wen Congyang > > I updated the patch and attached it on the mail. > > 2012/11/01 18:44, Wen Congyang wrote: >> This patch introduces a new function try_offline_node() to >>

Re: [PATCH v3 06/12] memory-hotplug: unregister memory section on SPARSEMEM_VMEMMAP

2012-11-19 Thread Wen Congyang
At 11/20/2012 02:22 PM, Jaegeuk Hanse Wrote: > On 11/01/2012 05:44 PM, Wen Congyang wrote: >> From: Yasuaki Ishimatsu >> >> Currently __remove_section for SPARSEMEM_VMEMMAP does nothing. But >> even if >> we use SPARSEMEM_VMEMMAP, we can unregister the memor

[PART4 Patch v2 0/2] memory-hotplug: allow online/offline memory to result movable node

2012-11-16 Thread Wen Congyang
This patch is part4 of the following patchset: https://lkml.org/lkml/2012/10/29/319 Part1 is here: https://lkml.org/lkml/2012/10/31/30 Part2 is here: https://lkml.org/lkml/2012/10/31/73 Part3 is here: https://lkml.org/lkml/2012/11/15/111 Part5 is here: https://lkml.org/lkml/

[PART4 Patch v2 2/2] memory_hotplug: allow online/offline memory to result movable node

2012-11-16 Thread Wen Congyang
ormal-memory-node movable-node is very important for power-saving, hardware partitioning and high-available-system(hardware fault management). Signed-off-by: Lai Jiangshan Tested-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 16 1 file change

[PART4 Patch v2 1/2] numa: add CONFIG_MOVABLE_NODE for movable-dedicated node

2012-11-16 Thread Wen Congyang
From: Lai Jiangshan All are prepared, we can actually introduce N_MEMORY. add CONFIG_MOVABLE_NODE make we can use it for movable-dedicated node Signed-off-by: Lai Jiangshan Tested-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- drivers/base/node.c | 6 ++ include/linux

Re: [PATCH v3 00/12] memory-hotplug: hot-remove physical memory

2012-11-16 Thread Wen Congyang
Ping At 11/01/2012 05:44 PM, Wen Congyang Wrote: > The patch-set was divided from following thread's patch-set. > https://lkml.org/lkml/2012/9/5/201 > > The last version of this patchset: > https://lkml.org/lkml/2012/10/23/213 > > If you want to know the rea

Re: [PART3 Patch v2 13/14] page_alloc: use N_MEMORY instead N_HIGH_MEMORY change the node_states initialization

2012-11-15 Thread Wen Congyang
At 11/16/2012 08:29 AM, Andrew Morton Wrote: > On Thu, 15 Nov 2012 16:57:36 +0800 > Wen Congyang wrote: > >> N_HIGH_MEMORY stands for the nodes that has normal or high memory. >> N_MEMORY stands for the nodes that has any memory. >> >> The code here need to

Re: [Patch v5 2/7] acpi,memory-hotplug: deal with eject request in hotplug queue

2012-11-15 Thread Wen Congyang
At 11/16/2012 07:32 AM, David Rientjes Wrote: > On Thu, 15 Nov 2012, Wen Congyang wrote: > >> The memory device can be removed by 2 ways: >> 1. send eject request by SCI >> 2. echo 1 >/sys/bus/pci/devices/PNP0C80:XX/eject >> >> We handle the 1st case in

Re: [PATCH] mm: fix a regression with HIGHMEM introduced by changeset 7f1290f2f2a4d

2012-11-15 Thread Wen Congyang
At 2012/11/15 19:28, Bob Liu Wrote: On Thu, Nov 15, 2012 at 5:22 PM, Wen Congyang wrote: Hi, Liu Jiang At 11/14/2012 10:52 PM, Jiang Liu Wrote: On 11/07/2012 04:43 AM, Andrew Morton wrote: On Tue, 6 Nov 2012 09:31:57 +0800 Jiang Liu wrote: Changeset 7f1290f2f2 tries to fix a issue when

Re: [PATCH] mm: fix a regression with HIGHMEM introduced by changeset 7f1290f2f2a4d

2012-11-15 Thread Wen Congyang
t; touching arch specific code. But things are more complex than my expectation > and > I'm still working on that. > So how about totally reverting the changeset > 7f1290f2f2a4d2c3f1b7ce8e87256e052ca23125 > and I will post another version once I found a cleaner way?

[PART3 Patch v2 06/14] mm,migrate: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
Signed-off-by: Wen Congyang --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/migrate.c b/mm/migrate.c index 77ed2d7..d595e58 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1201,7 +1201,7 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes

[PART3 Patch v2 05/14] oom: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
-off-by: Wen Congyang --- mm/oom_kill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 79e0f3e..aa2d89c 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -257,7 +257,7 @@ static enum oom_constraint constrained_alloc(struct zonelist *zonelist

[PART3 Patch v2 08/14] hugetlb: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
-off-by: Wen Congyang --- drivers/base/node.c | 2 +- mm/hugetlb.c| 24 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index af1a177..31f4805 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c

[PART3 Patch v2 10/14] kthread: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
From: Lai Jiangshan N_HIGH_MEMORY stands for the nodes that has normal or high memory. N_MEMORY stands for the nodes that has any memory. The code here need to handle with the nodes which have memory, we should use N_MEMORY instead. Signed-off-by: Lai Jiangshan Signed-off-by: Wen Congyang

[PART3 Patch v2 09/14] vmstat: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
Signed-off-by: Wen Congyang --- mm/vmstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmstat.c b/mm/vmstat.c index c737057..1b5cacd 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -930,7 +930,7 @@ static int pagetypeinfo_show(struct seq_file *m, void *arg

[PART3 Patch v2 12/14] vmscan: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
-off-by: Wen Congyang --- mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 8b055e9..5f86835 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3137,7 +3137,7 @@ static int __devinit cpu_callback(struct notifier_block *nfb, int

[PART3 Patch v2 13/14] page_alloc: use N_MEMORY instead N_HIGH_MEMORY change the node_states initialization

2012-11-15 Thread Wen Congyang
node_states. Signed-off-by: Lai Jiangshan Signed-off-by: Lin Feng Signed-off-by: Wen Congyang --- arch/x86/mm/init_64.c | 4 +++- mm/page_alloc.c | 42 +++--- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/arch/x86/mm/init_64.c b

[PART3 Patch v2 14/14] hotplug: update nodemasks management

2012-11-15 Thread Wen Congyang
From: Lai Jiangshan update nodemasks management for N_MEMORY Signed-off-by: Lai Jiangshan Signed-off-by: Wen Congyang --- Documentation/memory-hotplug.txt | 5 ++- include/linux/memory.h | 1 + mm/memory_hotplug.c | 87 +--- 3

[PART3 Patch v2 00/14] introduce N_MEMORY

2012-11-15 Thread Wen Congyang
This patch is part3 of the following patchset: https://lkml.org/lkml/2012/10/29/319 Part1 is here: https://lkml.org/lkml/2012/10/31/30 Part2 is here: https://lkml.org/lkml/2012/10/31/73 Part4 is here: https://lkml.org/lkml/2012/10/31/129 Part5 is here: https://lkml.org/lkml/

[PART3 Patch v2 04/14] memcontrol: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
From: Lai Jiangshan N_HIGH_MEMORY stands for the nodes that has normal or high memory. N_MEMORY stands for the nodes that has any memory. The code here need to handle with the nodes which have memory, we should use N_MEMORY instead. Signed-off-by: Lai Jiangshan Signed-off-by: Wen Congyang

[PART3 Patch v2 11/14] init: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
From: Lai Jiangshan N_HIGH_MEMORY stands for the nodes that has normal or high memory. N_MEMORY stands for the nodes that has any memory. The code here need to handle with the nodes which have memory, we should use N_MEMORY instead. Signed-off-by: Lai Jiangshan Signed-off-by: Wen Congyang

[PART3 Patch v2 07/14] mempolicy: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
From: Lai Jiangshan N_HIGH_MEMORY stands for the nodes that has normal or high memory. N_MEMORY stands for the nodes that has any memory. The code here need to handle with the nodes which have memory, we should use N_MEMORY instead. Signed-off-by: Lai Jiangshan Signed-off-by: Wen Congyang

[PART3 Patch v2 03/14] procfs: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
-off-by: Wen Congyang --- fs/proc/kcore.c| 2 +- fs/proc/task_mmu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 86c67ee..e96d4f1 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -249,7 +249,7 @@ static int

[PART3 Patch v2 02/14] cpuset: use N_MEMORY instead N_HIGH_MEMORY

2012-11-15 Thread Wen Congyang
-off-by: Wen Congyang --- Documentation/cgroups/cpusets.txt | 2 +- include/linux/cpuset.h| 2 +- kernel/cpuset.c | 32 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Documentation/cgroups/cpusets.txt b

[PART3 Patch v2 01/14] node_states: introduce N_MEMORY

2012-11-15 Thread Wen Congyang
and cause problem. In one word, we need a N_MEMORY. We just intrude it as an alias to N_HIGH_MEMORY and fix all im-proper usages of N_HIGH_MEMORY in late patches. Signed-off-by: Lai Jiangshan Acked-by: Christoph Lameter Acked-by: Hillf Danton Signed-off-by: Wen Congyang --- include/linux/n

[Patch v5 5/7] acpi_memhotplug.c: don't allow to eject the memory device if it is being used

2012-11-14 Thread Wen Congyang
: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi

[Patch v5 3/7] acpi_memhotplug.c: fix memory leak when memory device is unbound from the module acpi_memhotplug

2012-11-14 Thread Wen Congyang
: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 6e12042..c5e7b6d

[Patch v5 7/7] acpi_memhotplug.c: auto bind the memory device which is hotplugged before the driver is loaded

2012-11-14 Thread Wen Congyang
: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers/acpi

[Patch v5 2/7] acpi,memory-hotplug: deal with eject request in hotplug queue

2012-11-14 Thread Wen Congyang
Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c |

[Patch v5 1/7] acpi,memory-hotplug : add memory offline code to acpi_memory_device_remove()

2012-11-14 Thread Wen Congyang
CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 31 --- 1 file changed,

[Patch v5 0/7] acpi,memory-hotplug: implement framework for hot removing memory

2012-11-14 Thread Wen Congyang
ock list_lock when removing memory fails. 2. patch2: just rebase them 3. patch3-7: these patches are in -mm tree, and they conflict with this patchset, so Adrew Morton drop them from -mm tree. I rebase and merge them into this patchset. Wen Congyang (6): acpi,memory-hotplug: deal with ej

[Patch v5 4/7] acpi_memhotplug.c: free memory device if acpi_memory_enable_device() failed

2012-11-14 Thread Wen Congyang
Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 4 +++- 1 file changed, 3 insertions(+), 1

[Patch v5 6/7] acpi_memhotplug.c: bind the memory device when the driver is being loaded

2012-11-14 Thread Wen Congyang
loaded. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers

Re: [PART3 Patch 00/14] introduce N_MEMORY

2012-11-14 Thread Wen Congyang
At 11/15/2012 03:52 AM, Andrew Morton Wrote: > On Fri, 02 Nov 2012 15:41:55 +0800 > Wen Congyang wrote: > >> At 11/02/2012 05:36 AM, David Rientjes Wrote: >>> On Thu, 1 Nov 2012, Wen Congyang wrote: >>> >>>>> This doesn't describe why we nee

Re: [Patch v4 1/7] acpi,memory-hotplug: introduce a mutex lock to protect the list in acpi_memory_device

2012-11-14 Thread Wen Congyang
At 11/15/2012 07:34 AM, Rafael J. Wysocki Wrote: > On Tuesday, November 13, 2012 10:04:53 AM Wen Congyang wrote: >> At 11/13/2012 05:00 AM, Toshi Kani Wrote: >>> On Thu, 2012-11-08 at 19:04 +0800, Wen Congyang wrote: >>>> The memory device can be removed by 2 ways:

[Patch v4] x86: make 'mem=' option to work for efi platform

2012-11-13 Thread Wen Congyang
bove the mem_limit b. don't ignore E820_RAM entries which are BOOT_SERVICES_{CODE,DATA} regions Signed-off-by: Wen Congyang --- arch/x86/include/asm/e820.h | 2 ++ arch/x86/kernel/e820.c | 72 +++-- arch/x86/platform/efi/efi.c | 15 -- 3

Re: [Patch v4 1/7] acpi,memory-hotplug: introduce a mutex lock to protect the list in acpi_memory_device

2012-11-12 Thread Wen Congyang
At 11/13/2012 05:00 AM, Toshi Kani Wrote: > On Thu, 2012-11-08 at 19:04 +0800, Wen Congyang wrote: >> The memory device can be removed by 2 ways: >> 1. send eject request by SCI >> 2. echo 1 >/sys/bus/pci/devices/PNP0C80:XX/eject >> >> This 2 events may happ

Re: [RFC PATCH 0/3] acpi: Introduce prepare_remove device operation

2012-11-11 Thread Wen Congyang
still need to do preparation. But you don't do it in your patch. Thanks Wen Congyang > > acpi_bus_trim is changed accordingly to handle preparation for removal and > actual removal. > > With this patchset, only acpi memory devices use the new prepare_remove > device opera

[Patch v4 7/7] acpi_memhotplug.c: auto bind the memory device which is hotplugged before the driver is loaded

2012-11-08 Thread Wen Congyang
: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers/acpi

[Patch v4 5/7] acpi_memhotplug.c: don't allow to eject the memory device if it is being used

2012-11-08 Thread Wen Congyang
: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 46 +- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi

[Patch v4 4/7] acpi_memhotplug.c: free memory device if acpi_memory_enable_device() failed

2012-11-08 Thread Wen Congyang
Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 4 +++- 1 file changed, 3 insertions(+), 1

[Patch v4 6/7] acpi_memhotplug.c: bind the memory device when the driver is being loaded

2012-11-08 Thread Wen Congyang
loaded. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers

[Patch v4 3/7] acpi_memhotplug.c: fix memory leak when memory device is unbound from the module acpi_memhotplug

2012-11-08 Thread Wen Congyang
: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index e573e87..5e5ac80

[Patch v4 1/7] acpi,memory-hotplug: introduce a mutex lock to protect the list in acpi_memory_device

2012-11-08 Thread Wen Congyang
jes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Wen Congyang --- The commit in pm tree is 85fcb

[Patch v4 2/7] acpi,memory-hotplug : add memory offline code to acpi_memory_device_remove()

2012-11-08 Thread Wen Congyang
CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Rafael J. Wysocki CC: Konrad Rzeszutek Wilk Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- The commit for pm tree is d0fbb400 drivers/acpi/acpi_memhotplug.c |

[Patch v4 0/7] acpi,memory-hotplug : implement framework for hot removing memory

2012-11-08 Thread Wen Congyang
rop them from -mm tree. I rebase and merge them into this patchset. Wen Congyang (6): acpi,memory-hotplug: introduce a mutex lock to protect the list in acpi_memory_device acpi_memhotplug.c: fix memory leak when memory device is unbound from the module acpi_memhotplug acpi_memhotplu

Re: [PATCH v2] memory-hotplug: fix NR_FREE_PAGES mismatch's fix

2012-11-08 Thread Wen Congyang
At 11/08/2012 05:06 PM, Wen Congyang Wrote: > > When a page is freed and put into pcp list, get_freepage_migratetype() > doesn't return MIGRATE_ISOLATE even if this pageblock is isolated. > So we should use get_freepage_migratetype() instead of mt to check > whether it is is

[PATCH v2] memory-hotplug: fix NR_FREE_PAGES mismatch's fix

2012-11-08 Thread Wen Congyang
When a page is freed and put into pcp list, get_freepage_migratetype() doesn't return MIGRATE_ISOLATE even if this pageblock is isolated. So we should use get_freepage_migratetype() instead of mt to check whether it is isolated. --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH -next] ACPI: fix missing unlock on error in acpi_memory_remove_memory()

2012-11-07 Thread Wen Congyang
fix it, but don't resend it because it is in test now. Thanks Wen Congyang > --- > drivers/acpi/acpi_memhotplug.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c > index 92c973a..e5

Re: [PART3 Patch 00/14] introduce N_MEMORY

2012-11-02 Thread Wen Congyang
At 11/02/2012 05:36 AM, David Rientjes Wrote: > On Thu, 1 Nov 2012, Wen Congyang wrote: > >>> This doesn't describe why we need the new node state, unfortunately. It >> >> 1. Somethimes, we use the node which contains the memory that can be used by >>ke

Re: [PART6 Patch] mempolicy: fix is_valid_nodemask()

2012-11-01 Thread Wen Congyang
At 11/01/2012 02:21 AM, David Rientjes Wrote: > On Wed, 31 Oct 2012, Wen Congyang wrote: > >> From: Lai Jiangshan >> >> is_valid_nodemask() is introduced by 19770b32. but it does not match >> its comments, because it does not check the zone which > policy_zone. &

[PATCH v3 12/12] memory-hotplug: free node_data when a node is offlined

2012-11-01 Thread Wen Congyang
: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index d965da3..e281c31 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1320,9 +1320,12

[PATCH v3 10/12] memory-hotplug: memory_hotplug: clear zone when removing the memory

2012-11-01 Thread Wen Congyang
Len Brown CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 207 1 file changed, 207 insertions(+) diff --git a/mm/memory_h

  1   2   3   4   >