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

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

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

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

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

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

[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

[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 08/12] memory-hotplug: remove memmap of sparse-vmemmap

2012-11-01 Thread Wen Congyang
__remove_section() of CONFIG_SPARSEMEM_VMEMMAP is deleted. Note: vmemmap_kfree() and vmemmap_free_bootmem() are 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 CC: Wen

[PATCH v3 07/12] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

2012-11-01 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 v3 09/12] memory-hotplug: remove page table of x86_64 architecture

2012-11-01 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 v3 11/12] memory-hotplug: remove sysfs file of node

2012-11-01 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 v3 02/12] memory-hotplug: check whether all memory blocks are offlined or not when removing memory

2012-11-01 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 v3 05/12] memory-hotplug: introduce new function arch_remove_memory() for removing page table depends on architecture

2012-11-01 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

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

2012-11-01 Thread Wen Congyang
ge, just remove reduntant codes. Patch9: merge the patch from wujianguo into this patch. flush tlb on all cpu after the pagetable is changed. Patch12: new patch, free node_data when a node is offlined Wen Congyang (6): memory-hotplug: try to offline the memory twice to avoid dependence

[PATCH v3 04/12] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2012-11-01 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 v3 01/12] memory-hotplug: try to offline the memory twice to avoid dependence

2012-11-01 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 v3 03/12] memory-hotplug: remove redundant codes

2012-11-01 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 f4fdedd..80fc70c 100644 --- a/mm/memory_hotplug.c +++ b/mm

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

2012-11-01 Thread Wen Congyang
: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- 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 ca07433..66a79a7 100644

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

2012-10-29 Thread Wen Congyang
rt them >> when the memory is removed. >> >> The patch adds a new function __remove_zone() to do this. >> >> CC: David Rientjes >> CC: Jiang Liu >> CC: Len Brown >> CC: Christoph Lameter >> Cc: Minchan Kim >> CC: Andrew Morton >>

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

2012-10-23 Thread Wen Congyang
At 10/23/2012 06:30 PM, Ni zhan Chen Wrote: > On 10/23/2012 06:30 PM, we...@cn.fujitsu.com wrote: >> From: Wen Congyang > > The patchset doesn't support kernel memory hot-remove, correct? If the > answer is yes, you should point out in your patchset changelog. The an

Re: [PATCH 8/10] memory-hotplug : remove page table of x86_64 architecture

2012-10-23 Thread Wen Congyang
At 10/23/2012 03:09 PM, wujianguo Wrote: > On 2012-10-22 15:11, Wen Congyang wrote: >> Hi, Wu >> >> Sorry for late reply. >> >> At 10/09/2012 04:26 PM, wujianguo Wrote: >>> Hi Congyang, >>> I think we should also free pages which are used by

Re: [PATCH 8/10] memory-hotplug : remove page table of x86_64 architecture

2012-10-22 Thread Wen Congyang
> - __split_large_page((pte_t *)pud, addr, (pte_t *)pmd); > + __split_large_page((pte_t *)pud, > +(unsigned long)__va(addr), > +(pte_t *)pmd); > >

Re: [PATCH 1/10] memory-hotplug : check whether memory is offline or not when removing memory

2012-10-19 Thread Wen Congyang
t >> hold >> the lock in the whole operation. So we should check whether all memory >> sections >> are offlined before step6. > > You should describe the race scenario in the patch description. OK? > OK Thanks Wen Congyang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 1/10] memory-hotplug : check whether memory is offline or not when removing memory

2012-10-19 Thread Wen Congyang
At 2012/10/19 18:44, Wen Congyang Wrote: At 10/06/2012 03:27 AM, KOSAKI Motohiro Wrote: On Thu, Oct 4, 2012 at 10:25 PM, Yasuaki Ishimatsu wrote: When calling remove_memory(), the memory should be offline. If the function is used to online memory, kernel panic may occur. So the patch checks

Re: [PATCH 1/10] memory-hotplug : check whether memory is offline or not when removing memory

2012-10-19 Thread Wen Congyang
s whether memory is offline or not. > > You don't explain WHY we need the check. This patch is no necessary now, because the newest kernel has checked it. Thanks Wen Congyang > > >> CC: David Rientjes >> CC: Jiang Liu >> CC: Len Brown >> CC: Chr

Re: [PATCH 5/10] memory-hotplug : memory-hotplug: check page type in get_page_bootmem

2012-10-18 Thread Wen Congyang
>> CC: David Rientjes >>> CC: Jiang Liu >>> CC: Len Brown >>> CC: Christoph Lameter >>> Cc: Minchan Kim >>> CC: Andrew Morton >>> CC: KOSAKI Motohiro >>> CC: Wen Congyang >>> Signe

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-10-09 Thread Wen Congyang
ne, I am doing a hot-remove with "echo 1 > > /sys/bus/acpi/devices/PNP/eject" > When I do the OSPM-eject, I often get slab corruption in "acpi-state" cache, > or in other caches The following patch can fix this problem: https://lkml.org/lkml/2012/7/12/186 Thanks Wen

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-10-08 Thread Wen Congyang
At 09/27/2012 12:46 AM, Vasilis Liaskovitis Wrote: > Hi, > > I am testing 3.6.0-rc7 with this v9 patchset plus more recent fixes > [1],[2],[3] > Running in a guest (qemu+seabios from [4]). > CONFIG_SLAB=y > CONFIG_DEBUG_SLAB=y > > After succesfull hot-add and online, I am doing a hot-remove wit

Re: [PATCH 0/10] memory-hotplug: hot-remove physical memory

2012-10-07 Thread Wen Congyang
offline every non primary memory > block. 2nd iterate: > offline primary (i.e. first added) memory block. It may work. > OK, I will try it. Thanks Wen Congyang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 8/10] memory-hotplug : remove page table of x86_64 architecture

2012-10-07 Thread Wen Congyang
phys_pmd_remove(pmd, addr, end); >> +unmap_low_page(pmd); >> +__flush_tlb_all(); >> +} >> +__flush_tlb_all(); > > This doesn't flush the other CPUs doesn't it? How to flush the other CPU's tlb? use on_each_cpu() to run __flush_tlb_all() on each online cpu? Thanks Wen Congyang > > -Andi > ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-09-27 Thread Wen Congyang
At 09/27/2012 06:35 PM, Vasilis Liaskovitis Wrote: > On Thu, Sep 27, 2012 at 02:37:14PM +0800, Wen Congyang wrote: >> Hi Vasilis Liaskovitis >> >> At 09/27/2012 12:46 AM, Vasilis Liaskovitis Wrote: >>> Hi, >>> >>> I am testing 3.6.0-rc7 with this v9

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-09-27 Thread Wen Congyang
> > Patch 20/21 deals with a similar scenario, but only for __PG_HWPOISON flag. > Did i miss any other patch for this? Please try the following patch: >From a38ec678e0a9b48b252f457d7910b7527049dc43 Mon Sep 17 00:00:00 2001 From: Wen Congyang Date: Thu, 27 Sep 2012 17:27:57 +0800

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-09-27 Thread Wen Congyang
with SCI (qemu) eject > - attempt to hot-readd same memory > > When the pages are re-onlined on hot-readd, I get a bad_page state for many > pages e.g. I have reproduced this problem, and I investigate it now. Thanks Wen Congyang > > [ 59.611278] init_memory_mapping: [mem

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-09-26 Thread Wen Congyang
ing information: 1. config file 2. qemu's command line You said you did OSPM-eject. Do you mean write 1 to /sys/bus/acpi/devices/PNP0C80:XX/eject? Thanks Wen Congyang > > [ 170.566995] Slab corruption (Not tainted): Acpi-State > start=88009fc1e548, len=80 > [ 1

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-09-26 Thread Wen Congyang
with SCI (qemu) eject > - attempt to hot-readd same memory > > When the pages are re-onlined on hot-readd, I get a bad_page state for many > pages e.g. Can you provide your config file? Thanks Wen Congyang > > [ 59.611278] init_memory_mapping: [mem 0x8000-0x9fff] >

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-09-26 Thread Wen Congyang
eric_file_aio_write+0x1a0/0x3c0 > [ 232.120013] [] ? __sb_start_write+0x6b/0x130 > [ 232.120013] [] ? generic_file_aio_write+0x7e/0x100 > [ 232.120013] [] ? do_sync_write+0x94/0xd0 > [ 232.120013] [] ? vfs_write+0xaa/0x160 > [ 232.120013] [] ? sys_write+0x47/0x90 > [ 232.120

Re: [RFC v8 PATCH 00/20] memory-hotplug: hot-remove physical memory

2012-09-18 Thread Wen Congyang
At 09/13/2012 01:18 AM, Vasilis Liaskovitis Wrote: > Hi, > > On Wed, Sep 12, 2012 at 01:20:28PM +0800, Wen Congyang wrote: >>> >>> On Mon, Sep 10, 2012 at 10:01:44AM +0800, Wen Congyang wrote: >>>> At 09/10/2012 09:46 AM, Yasuaki Ishimatsu Wrote: >>

Re: [RFC v8 PATCH 00/20] memory-hotplug: hot-remove physical memory

2012-09-11 Thread Wen Congyang
At 09/10/2012 09:52 PM, Vasilis Liaskovitis Wrote: > Hi, > > On Mon, Sep 10, 2012 at 10:01:44AM +0800, Wen Congyang wrote: >> At 09/10/2012 09:46 AM, Yasuaki Ishimatsu Wrote: >>> Hi Wen, >>> >>> 2012/09/01 5:49, Andrew Morton wrote: >&

Re: [RFC v8 PATCH 00/20] memory-hotplug: hot-remove physical memory

2012-09-10 Thread Wen Congyang
When system resume, I just need to > enable it again. > > Hi Wen, > > I am sorry for that I doesn't know the "_PSx support" means. Maybe I > needn't it. Hmm, arm doesn't support ACPI, so please ignore it. Thanks Wen Congyang > > Thanks, > Jerr

Re: [RFC v9 PATCH 05/21] memory-hotplug: check whether memory is present or not

2012-09-10 Thread Wen Congyang
change_state() to hotremoving memory, I think this patch can be removed. What do you think? Thanks Wen Congyang > > CC: David Rientjes > CC: Jiang Liu > CC: Len Brown > CC: Benjamin Herrenschmidt > CC: Paul Mackerras > CC: Christoph Lameter > Cc: Minchan Kim > C

Re: [RFC v9 PATCH 05/21] memory-hotplug: check whether memory is present or not

2012-09-10 Thread Wen Congyang
At 09/11/2012 10:24 AM, Yasuaki Ishimatsu Wrote: > Hi Wen, > > 2012/09/11 11:15, Wen Congyang wrote: >> Hi, ishimatsu >> >> At 09/05/2012 05:25 PM, we...@cn.fujitsu.com Wrote: >>> From: Yasuaki Ishimatsu >>> >>> If system supports memory h

Re: [RFC v8 PATCH 00/20] memory-hotplug: hot-remove physical memory

2012-09-10 Thread Wen Congyang
doesn't want > the offline memory is in *self-refresh* state. Power saving? Do you need _PSx support? Thanks Wen Congyang > > Any comments are appreciated. > > Thanks, > Jerry > > 2012/9/10 Vasilis Liaskovitis > >> Hi, >> >> On Mon,

Re: [RFC v8 PATCH 00/20] memory-hotplug: hot-remove physical memory

2012-09-09 Thread Wen Congyang
uest, can we hot-remove memory on > kvm guest? > > http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg01389.html Yes, if we apply this patchset, we can test hot-remove memory on kvm guest. But that patchset doesn't implement _PS3, so there is some restriction. Thanks Wen Cong

Re: [RFC v9 PATCH 20/21] memory-hotplug: clear hwpoisoned flag when onlining pages

2012-09-06 Thread Wen Congyang
At 09/06/2012 03:27 PM, andywu106建国 Wrote: > 2012/9/5 >> >> From: Wen Congyang >> >> hwpoisoned may set when we offline a page by the sysfs interface >> /sys/devices/system/memory/soft_offline_page or >> /sys/devices/system/memory/hard_offline_page. If we

Re: [RFC v8 PATCH 08/20] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2012-09-04 Thread Wen Congyang
At 09/05/2012 07:16 AM, Andrew Morton Wrote: > On Mon, 03 Sep 2012 13:51:10 +0800 > Wen Congyang wrote: > >>>> +static void release_firmware_map_entry(struct kobject *kobj) >>>> +{ >>>> + struct firmware_map_entry *entry = to_memmap_entry(kobj); &

Re: [RFC v8 PATCH 13/20] memory-hotplug: check page type in get_page_bootmem

2012-09-03 Thread Wen Congyang
t to fix? The function get_page_bootmem() may be called to the same page more than once, but I don't find any problem about current implementation. Thanks Wen Congyang > >> --- a/mm/memory_hotplug.c >> +++ b/mm/memory_hotplug.c >> @@ -95,10 +95,17 @@ static void release_m

Re: [RFC v8 PATCH 08/20] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2012-09-03 Thread Wen Congyang
(u64 start, u64 end, >> return 0; >> } >> >> +/** >> + * firmware_map_remove_entry() - Does the real work to remove a firmware >> + * memmap entry. >> + * @entry: removed entry. >> + **/ >> +static inline void firmware_map_remove_entry(s

Re: [RFC v8 PATCH 08/20] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2012-09-02 Thread Wen Congyang
const char *type) >> +{ >> +struct firmware_map_entry *entry; >> + >> + entry = find_firmware_map_entry(start, end - 1, type); >> +if (!entry) >> +return -EINVAL; >> + >> +firmware_map_remove_entry(entry)

Re: [RFC v8 PATCH 04/20] memory-hotplug: offline and remove memory when removing the memory device

2012-09-02 Thread Wen Congyang
The memory might become online by other task, even if you offine it. >> + * So we check whether the cpu has been onlined or not. > > I think you meant "memory", not "cpu". Yes. I will fix it. Thanks Wen Congyang > > Actually, "check whether

Re: [RFC PATCH V6 13/19] memory-hotplug: check page type in get_page_bootmem

2012-08-06 Thread Wen Congyang
> 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: Wen Congyang > Signed-off-by: Yasuaki Ishimatsu > --- > m

Re: [RFC PATCH V6 16/19] memory-hotplug: free memmap of sparse-vmemmap

2012-08-06 Thread Wen Congyang
At 08/03/2012 03:49 PM, we...@cn.fujitsu.com Wrote: > From: Wen Congyang This line is wrong. This patch is 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 memory but al

Re: [RFC PATCH V6 15/19] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

2012-08-06 Thread Wen Congyang
ristoph Lameter > Cc: Minchan Kim > CC: Andrew Morton > CC: KOSAKI Motohiro > CC: Wen Congyang > Signed-off-by: Yasuaki Ishimatsu > --- > arch/ia64/mm/discontig.c |6 > arch/powerpc/mm/init_64.c |6 > arch/s390/mm/vmem.c|

Re: [RFC PATCH v5 16/19] memory-hotplug: free memmap of sparse-vmemmap

2012-07-31 Thread Wen Congyang
At 07/31/2012 08:22 PM, Gerald Schaefer Wrote: > On Fri, 27 Jul 2012 18:34:38 +0800 > 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

Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory()

2012-07-31 Thread Wen Congyang
At 08/01/2012 10:44 AM, jencce zhou Wrote: > 2012/7/27 Wen Congyang : >> We don't call __add_pages() directly in the function add_memory() >> because some other architecture related things need to be done >> before or after calling __add_pages(). So we should i

Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory()

2012-07-31 Thread Wen Congyang
At 07/31/2012 08:40 PM, Gerald Schaefer Wrote: > On Mon, 30 Jul 2012 18:35:37 +0800 > Wen Congyang wrote: > >> At 07/30/2012 06:23 PM, Heiko Carstens Wrote: >>> On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: >>>> We don't call __add_pa

Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory()

2012-07-30 Thread Wen Congyang
At 07/30/2012 06:23 PM, Heiko Carstens Wrote: > On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: >> We don't call __add_pages() directly in the function add_memory() >> because some other architecture related things need to be done >> before or after ca

Re: [RFC PATCH v5 19/19] memory-hotplug: remove sysfs file of node

2012-07-29 Thread Wen Congyang
At 07/27/2012 06:45 PM, Yasuaki Ishimatsu Wrote: > Hi Wen, > > 2012/07/27 19:36, Wen Congyang wrote: >> From: Yasuaki Ishimatsu >> >> The patch adds node_set_offline() and unregister_one_node() to >> remove_memory() >> for removing sysfs file of node. >

Re: [RFC PATCH v5 19/19] memory-hotplug: remove sysfs file of node

2012-07-29 Thread Wen Congyang
At 07/27/2012 06:45 PM, Yasuaki Ishimatsu Wrote: > Hi Wen, > > 2012/07/27 19:36, Wen Congyang wrote: >> From: Yasuaki Ishimatsu >> >> The patch adds node_set_offline() and unregister_one_node() to >> remove_memory() >> for removing sysfs file of node. >

Re: [RFC PATCH v5 05/19] memory-hotplug: check whether memory is present or not

2012-07-29 Thread Wen Congyang
At 07/28/2012 04:17 AM, Tony Luck Wrote: > On Fri, Jul 27, 2012 at 3:28 AM, Wen Congyang wrote: >> +static inline int pfns_present(unsigned long pfn, unsigned long nr_pages) >> +{ >> + int i; >> + for (i = 0; i < nr_pages; i++) { >> +

[RFC PATCH v5 19/19] memory-hotplug: remove sysfs file of node

2012-07-27 Thread Wen Congyang
: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- mm/memory_hotplug.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 5ac035f..5681968 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c

[RFC PATCH v5 18/19] memory-hotplug: add node_device_release

2012-07-27 Thread Wen Congyang
Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- drivers/base/node.c |8 1 files changed, 8 insertions(+), 0 deletions(-) di

[RFC PATCH v5 17/19] memory_hotplug: clear zone when the memory is removed

2012-07-27 Thread Wen Congyang
Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- mm/memory_hotplug.c | 181 +++ 1 files changed, 181 insert

[RFC PATCH v5 16/19] memory-hotplug: free memmap of sparse-vmemmap

2012-07-27 Thread Wen Congyang
__remove_section() of CONFIG_SPARSEMEM_VMEMMAP is deleted. 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: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- arch/x86

[RFC PATCH v5 15/19] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

2012-07-27 Thread Wen Congyang
: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- arch/x86/mm/init_64.c | 52 include

[RFC PATCH v5 14/19] memory-hotplug: move register_page_bootmem_info_node and put_page_bootmem for sparse-vmemmap

2012-07-27 Thread Wen Congyang
Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- include/linux/memory_hotplug.h |9 - mm/memory_hotplug.c|8 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/include/linux

[RFC PATCH v5 13/19] memory-hotplug: check page type in get_page_bootmem

2012-07-27 Thread Wen Congyang
aul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- mm/memory_hotplug.c | 15 +++ 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplu

[RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory()

2012-07-27 Thread Wen Congyang
n for s390 is not implemented(I don't know how to implement it 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: We

[RFC PATCH v5 11/19] memory-hotplug: remove_memory calls __remove_pages

2012-07-27 Thread Wen Congyang
: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- arch/powerpc/platforms/pseries/hotplug-memory.c |5 + include/linux/memory_hotplug.h |3 +-- mm/memory_hotplug.c | 18 +++--- 3 files changed, 13 insertions

[RFC PATCH v5 10/19] memory-hotplug: add memory_block_release

2012-07-27 Thread Wen Congyang
ce_release(). So the patch implements memory_block_release() 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: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- dr

[RFC PATCH v5 09/19] memory-hotplug: does not release memory region in PAGES_PER_SECTION chunks

2012-07-27 Thread Wen Congyang
fixes it. 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: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- arch/powerpc/platforms/pseries/hotplug-memory.c | 13

[RFC PATCH v5 08/19] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2012-07-27 Thread Wen Congyang
free memory which is allocated by bootmem. 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: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- drivers

[RFC PATCH v5 07/19] memory-hotplug: call acpi_bus_remove() to remove memory device

2012-07-27 Thread Wen Congyang
Motohiro CC: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index ed37fc2..755cc31 100644 --- a/drivers/acpi/acpi_memhotplug.c

[RFC PATCH v5 06/19] memory-hotplug: export the function acpi_bus_remove()

2012-07-27 Thread Wen Congyang
CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- drivers/acpi/scan.c |3 ++- include/acpi/acpi_bus.h |1 + 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/scan.c b

[RFC PATCH v5 05/19] memory-hotplug: check whether memory is present or not

2012-07-27 Thread Wen Congyang
Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- include/linux/mmzone.h | 19 +++ mm/memory_hotplug.c| 13 + 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/include/linux/mmzone.h

[RFC PATCH v5 04/19] memory-hotplug: offline and remove memory when removing the memory device

2012-07-27 Thread Wen Congyang
CC: KOSAKI Motohiro Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 42 +-- drivers/base/memory.c | 39 + include/linux/memory.h |5 include/li

[RFC PATCH v5 03/19] memory-hotplug: store the node id in acpi_memory_device

2012-07-27 Thread Wen Congyang
CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu Signed-off-by: Wen Congyang Reviewed-by: Yasuaki Ishimatsu --- drivers/acpi/acpi_memhotplug.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 8957ed9

  1   2   >