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

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

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

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-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 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 v10] kvm: notify host when the guest is panicked

2012-08-28 Thread Wen Congyang
rtual device 3. it can work when starting the kernel Signed-off-by: Wen Congyang --- Documentation/virtual/kvm/pv_event.txt | 32 arch/ia64/include/asm/kvm_para.h | 14 ++ arch/powerpc/include/asm/kvm_para.h| 14 ++ arch/s390/in

[PATCH v10 1/6] start vm after reseting it

2012-08-28 Thread Wen Congyang
NNING(not RUN_STATE_PAUSED). Signed-off-by: Wen Congyang --- block.h |2 ++ qmp.c |2 +- vl.c|7 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/block.h b/block.h index 2e2be11..c3265c2 100644 --- a/block.h +++ b/block.h @@ -339,6 +339,8 @@

[PATCH v10 2/6] kvm: Update kernel headers

2012-08-28 Thread Wen Congyang
Corresponding kvm.git hash: 1d92128f with my patch for kvm --- linux-headers/asm-s390/kvm.h |2 +- linux-headers/asm-s390/kvm_para.h |2 +- linux-headers/asm-x86/kvm.h |1 + linux-headers/asm-x86/kvm_para.h |9 + linux-headers/linux/kvm.h |3 +++ lin

[PATCH v10 3/6] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-08-28 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index bd8ad74

[PATCH v10 4/6] add a new qevent: QEVENT_GUEST_PANICKED

2012-08-28 Thread Wen Congyang
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang --- monitor.c |1 + monitor.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index b17b1bb..f74dd2d 100644 --- a/monitor.c +++ b/monitor.c @@ -455,6 +455,7

[PATCH v10 5/6] introduce a new qom device to deal with panicked event

2012-08-28 Thread Wen Congyang
clude it's code into pv_event.c for such target. Note: if we emit QEVENT_GUEST_PANICKED only, and the management application does not receive this event(the management may not run when the event is emitted), the management won't know the guest is panicked. Signed-off-by: Wen Congyang ---

[PATCH v10 6/6] allower the user to disable pv event support

2012-08-28 Thread Wen Congyang
Signed-off-by: Wen Congyang --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 37eca23..10531a8 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -149,6 +149,8

Re: [PATCH v10] kvm: notify host when the guest is panicked

2012-08-29 Thread Wen Congyang
At 08/29/2012 07:56 PM, Sasha Levin Wrote: > On 08/29/2012 07:18 AM, Wen Congyang wrote: >> We can know the guest is panicked when the guest runs on xen. >> But we do not have such feature on kvm. >> >> Another purpose of this feature is: management app(for example: &

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

[PATCH 1/2] cpu_hotplug: unmap cpu2node when the cpu is hotremoved

2012-09-03 Thread Wen Congyang
0 [ 1650.232348] RSP [ 1650.274029] ---[ end trace adf84c90f3fea3e5 ]--- The reason is that: the cpu's node is not NUMA_NO_NODE, we will call alloc_pages_exact_node() to alloc memory on the node, but the node is offlined. Signed-off-by: Wen Congyang --- arch/x86/kernel/acpi/boot.c |5 + 1 f

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

[PATCH 2/2] numa: don't check if node is NUMA_NO_NODE

2012-09-03 Thread Wen Congyang
If we don't debug per_cpu maps, the cpu's node is stored in per_cpu variable numa_node. If node is NUMA_NO_NODE, it means the caller want to clear the cpu's node. So we should also call set_cpu_numa_node() in this case. Signed-off-by: Wen Congyang --- arch/x86/mm/numa.c |

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 PATCH 1/4] mm: introduce a safer interface to check whether a page is managed by SLxB

2012-09-04 Thread Wen Congyang
ng code from sparse.c triggers this issue, which causes failure > when removing a hot-added memory device. Hi, Liu What is the status of this patch? I encounter the same problem when removing a hot-added memory device. It causes the kernel panicked Thanks Wen Congyang > /* >

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: [PATCH v2 2/2] x86: reimplement mem boot option

2012-09-05 Thread Wen Congyang
Hi, H. Peter Anvin Do you have time to review this patch? Thanks Wen Congyang At 08/21/2012 04:11 PM, Wen Congyang Wrote: > Current mem boot option only can work for non efi environment. If the user > specifies add_efi_memmap, it cannot work for efi environment. In > the efi enviro

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 v2] memory-hotplug: remove MIGRATE_ISOLATE from free_area->free_list

2012-09-10 Thread Wen Congyang
At 09/11/2012 08:52 AM, Minchan Kim Wrote: > Hello Wen, > > On Fri, Sep 07, 2012 at 03:28:22PM +0800, Wen Congyang wrote: >> At 09/06/2012 10:53 AM, Minchan Kim Wrote: >>> Normally, MIGRATE_ISOLATE type is used for memory-hotplug. >>> But it's irony type

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 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: [V4 PATCH 02/26] memory_hotplug: fix missing nodemask management

2012-09-10 Thread Wen Congyang
pages(unsigned long pfn, unsigned long nr_pages) > { > @@ -467,13 +495,18 @@ int __ref online_pages(unsigned long pfn, unsigned long > nr_pages) > struct memory_notify arg; > > lock_memory_hotplug(); > + /* > + * This doesn't need a

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

[PATCH] memory cgroup: update root memory cgroup when node is onlined

2012-09-13 Thread Wen Congyang
p->info.nodeinfo[nid]->zoneinfo[zone].lruvec.zone when onlining the node, and we try to access it. Signed-off-by: Wen Congyang Reported-by: Tang Chen --- include/linux/memcontrol.h |7 +++ mm/memcontrol.c| 14 ++ mm/memory_hotplug.c|2 ++ 3 files ch

Re: [PATCH] memory cgroup: update root memory cgroup when node is onlined

2012-09-13 Thread Wen Congyang
At 09/13/2012 06:06 PM, Kamezawa Hiroyuki Wrote: > (2012/09/13 16:14), Wen Congyang wrote: >> root_mem_cgroup->info.nodeinfo is initialized when the system boots. >> But NODE_DATA(nid) is null if the node is not onlined, so >> root_mem_cgroup->info.nodeinfo[nid]-

Re: [PATCH] memory cgroup: update root memory cgroup when node is onlined

2012-09-13 Thread Wen Congyang
At 09/14/2012 04:59 AM, Johannes Weiner Wrote: > Hi, > > On Thu, Sep 13, 2012 at 03:14:28PM +0800, Wen Congyang wrote: >> root_mem_cgroup->info.nodeinfo is initialized when the system boots. >> But NODE_DATA(nid) is null if the node is not onlined, so >> root

Re: [PATCH] memory cgroup: update root memory cgroup when node is onlined

2012-09-13 Thread Wen Congyang
At 09/14/2012 09:36 AM, Hugh Dickins Wrote: > On Thu, 13 Sep 2012, Johannes Weiner wrote: >> On Thu, Sep 13, 2012 at 03:14:28PM +0800, Wen Congyang wrote: >>> root_mem_cgroup->info.nodeinfo is initialized when the system boots. >>> But NODE_DATA(nid) is null

Re: memory-hotplug : possible circular locking dependency detected

2012-09-13 Thread Wen Congyang
e lock mem_hotplug_mutex first. Thanks Wen Congyang > > [ 201.596363] Offlined Pages 32768 > [ 201.596373] remove from free list 14 1024 148000 > [ 201.596493] remove from free list 140400 1024 148000 > [ 201.596612] remove from free list 140800 1024 148000 >

Re: [PATCH 1/2] mm: refactor out __alloc_contig_migrate_alloc

2012-09-13 Thread Wen Congyang
int **resultp) > +{ > +gfp_t gfp_mask = GFP_USER | __GFP_MOVABLE; > + > +if (PageHighMem(page)) > +gfp_mask |= __GFP_HIGHMEM; > + > +return alloc_page(gfp_mask); alloc_page() will use current task's memory policy. I

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] mm: make zone_pcp_reset independ on MEMORY_HOTREMOVE

2012-10-23 Thread Wen Congyang
1,6 +6000,7 @@ void zone_pcp_reset(struct zone *zone) > local_irq_restore(flags); > } > > +#ifdef CONFIG_MEMORY_HOTREMOVE > /* > * All pages in the range must be isolated before calling this. > */ This patch looks find to me. Reviewed-by: Wen Congyang -- To

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: + memory-hotplug-allocate-zones-pcp-before-onlining-pages.patch added to -mm tree

2012-10-23 Thread Wen Congyang
s.patch I find a problem introduced by this patch, and the following is the fix: Do I need to merge them into a single patch? >From 705b8f7392adba8a36d8e89b5aef77d9a6a9042c Mon Sep 17 00:00:00 2001 From: Wen Congyang Date: Wed, 24 Oct 2012 14:21:15 +0800 Subject: [PATCH] memory-hotplug: buil

Re: [PATCH v3 4/9] clear the memory to store struct page

2012-10-26 Thread Wen Congyang
Hi, andrew morton: This patch has been acked by kosaki motohiro. Is it OK to be merged into -mm tree? Thanks Wen Congyang At 10/19/2012 02:46 PM, we...@cn.fujitsu.com Wrote: > From: Wen Congyang > > If sparse memory vmemmap is enabled, we can't free the memory to store > s

Re: [Patch v4 0/8] bugfix for memory hotplug

2012-10-31 Thread Wen Congyang
At 10/31/2012 07:23 PM, Wen Congyang Wrote: > The last version is here: > https://lkml.org/lkml/2012/10/19/56 > > Note: patch 1-3 are in -mm tree and I don't touch them. The other patches > except patch6 are also in mm tree. Patch 6 is not touched. > > Changes from

[Patch v4 1/8] memory hotplug: suppress "Device memoryX does not have a release() function" warning

2012-10-31 Thread Wen Congyang
f-by: Yasuaki Ishimatsu Acked-by: David Rientjes Cc: Jiang Liu Cc: Minchan Kim Acked-by: KOSAKI Motohiro Cc: Wen Congyang Cc: Greg KH Signed-off-by: Andrew Morton --- drivers/base/memory.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/base/memory.c

[Patch v4 0/8] bugfix for memory hotplug

2012-10-31 Thread Wen Congyang
pages, the free pages will continue to decrease. Wen Congyang (6): memory-hotplug: auto offline page_cgroup when onlining memory block failed memory-hotplug: fix NR_FREE_PAGES mismatch numa: convert static memory to dynamically allocated memory for per node device clear the

[Patch v4 5/8] suppress "Device nodeX does not have a release() function" warning

2012-10-31 Thread Wen Congyang
device_release(). So if system reuses the node struct, it has a garbage. CC: David Rientjes CC: Jiang Liu Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- drivers/base/node.c | 20 +++- 1 file changed

[Patch v4 6/8] clear the memory to store struct page

2012-10-31 Thread Wen Congyang
eported-by: Vasilis Liaskovitis Signed-off-by: Wen Congyang --- mm/sparse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/sparse.c b/mm/sparse.c index fac95f2..0021265 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -638,7 +638,6 @@ static struct page *__kmalloc_section_memma

[Patch v4 3/8] memory-hotplug: fix NR_FREE_PAGES mismatch

2012-10-31 Thread Wen Congyang
S in step3. So NR_FREE_PAGES is wrong after offlining pages. So there is no need to change NR_FREE_PAGES in step3. This patch also fixs a problem in step2: if the migratetype is MIGRATE_ISOLATE, we should not add NR_FRR_PAGES when we remove pages from pcppages. Signed-off-by: Wen Congyang Cc: Davi

[Patch v4 7/8] memory-hotplug: current hwpoison doesn't support memory offline

2012-10-31 Thread Wen Congyang
matsu Cc: Andi Kleen Cc: Dave Hansen Cc: Mel Gorman Signed-off-by: Wen Congyang --- include/linux/page-isolation.h | 10 ++ mm/memory-failure.c| 2 +- mm/memory_hotplug.c| 5 +++-- mm/page_alloc.c| 27 +++ mm/p

[Patch v4 8/8] memory-hotplug: allocate zone's pcp before onlining pages

2012-10-31 Thread Wen Congyang
: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Christoph Lameter Cc: Minchan Kim Cc: KOSAKI Motohiro Cc: Yasuaki Ishimatsu Cc: Dave Hansen Cc: Mel Gorman Signed-off-by: Wen Congyang --- mm/memory_hotplug.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[Patch v4 4/8] numa: convert static memory to dynamically allocated memory for per node device

2012-10-31 Thread Wen Congyang
igned-off-by: Wen Congyang --- arch/powerpc/kernel/sysfs.c | 4 ++-- drivers/base/node.c | 38 ++ include/linux/node.h| 2 +- mm/hugetlb.c| 4 ++-- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/arch/powerpc/k

[Patch v4 2/8] memory-hotplug: auto offline page_cgroup when onlining memory block failed

2012-10-31 Thread Wen Congyang
at we can't hot-remove the memory device on that node, because some memory is used to store page cgroup. If onlining the memory block is failed, there is no need to stort page cgroup for this memory. So auto offline page_cgroup when onlining memory block failed. Signed-off-by: Wen Congyang

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

2012-10-31 Thread Wen Congyang
jamin Herrenschmidt Cc: Paul Mackerras Cc: Christoph Lameter Cc: Minchan Kim Cc: KOSAKI Motohiro Cc: Yasuaki Ishimatsu Cc: Dave Hansen Cc: Mel Gorman Cc: Jianguo Wu Signed-off-by: Wen Congyang --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_allo

Re: [Patch v4 3/8] memory-hotplug: fix NR_FREE_PAGES mismatch

2012-10-31 Thread Wen Congyang
At 10/31/2012 09:41 PM, Jianguo Wu Wrote: > On 2012/10/31 19:23, Wen Congyang wrote: >> NR_FREE_PAGES will be wrong after offlining pages. We add/dec >> NR_FREE_PAGES like this now: >> >> 1. move all pages in buddy system to MIGRATE_ISOLATE, and dec NR_FREE_PAGES >&

Re: [PART2 Patch] node: cleanup node_state_attr

2012-10-31 Thread Wen Congyang
At 11/01/2012 02:29 AM, David Rientjes Wrote: > On Wed, 31 Oct 2012, Wen Congyang wrote: > >> diff --git a/drivers/base/node.c b/drivers/base/node.c >> index af1a177..5d7731e 100644 >> --- a/drivers/base/node.c >> +++ b/drivers/base/node.c >> @@ -614,23 +614,

Re: [PART3 Patch 00/14] introduce N_MEMORY

2012-10-31 Thread Wen Congyang
At 11/01/2012 02:16 AM, David Rientjes Wrote: > On Wed, 31 Oct 2012, Wen Congyang wrote: > >> From: Lai Jiangshan >> >> This patch is part3 of the following patchset: >> https://lkml.org/lkml/2012/10/29/319 >> >> Part1 is here: >> https:/

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

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

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

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: [RFC PATCH v4 12/13] memory-hotplug : add node_device_release

2012-07-26 Thread Wen Congyang
device_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

[RFC PATCH v5 00/19] memory-hotplug: hot-remove physical memory

2012-07-27 Thread Wen Congyang
add_early/hotplug [RFC PATCH v2 4/13] * add release_firmware_map_entry() for freeing firmware_map_entry [RFC PATCH v2 6/13] * add release_memory_block() for freeing memory_block [RFC PATCH v2 11/13] * fix wrong arguments of free_pages() Wen Congyang (5): memory-hotplug: implemen

[RFC PATCH 0/19] firmware_map : unify argument of firmware_map_add_early/hotplug

2012-07-27 Thread Wen Congyang
From: Yasuaki Ishimatsu There are two ways to create /sys/firmware/memmap/X sysfs: - firmware_map_add_early When the system starts, it is calledd from e820_reserve_resources() - firmware_map_add_hotplug When the memory is hot plugged, it is called from add_memory() But these functio

[RFC PATCH v5 01/19] memory-hotplug: rename remove_memory() to offline_memory()/offline_pages()

2012-07-27 Thread Wen Congyang
CC: 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/acpi/acpi_memhotplug.c |2 +- drivers/base/memory.c |9 +++--

[RFC PATCH v5 02/19] memory-hotplug: implement offline_memory()

2012-07-27 Thread Wen Congyang
ng 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: Vasilis Liaskovitis Signed-off-by: Wen Congyang --- drivers/base/memory.c | 31 +++

[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

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

  1   2   3   4   >