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

2012-11-26 Thread Jianguo Wu
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 > not removed, this function does nothing. > > CC: David Rientjes > CC: Ji

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

2012-11-26 Thread Jianguo Wu
On 2012/11/26 23:48, H. Peter Anvin wrote: > On 11/26/2012 05:15 AM, Tang Chen wrote: >> >> Hi Wu, >> >> That is really a problem. And, before numa memory got initialized, >> memblock subsystem would be used to allocate memory. I didn't find any >> approach that could fully address it when I makin

mm/vmemmap: fix wrong use of virt_to_page

2012-11-26 Thread Jianguo Wu
DR3: DR6 Signed-off-by: Jianguo Wu Signed-off-by: Jiang Liu --- mm/sparse.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mm/sparse.c b/mm/sparse.c index fac95f2..a83de2f 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -617,7 +617,7 @@ static v

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

2012-11-26 Thread Jianguo Wu
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: >>>> >>>> Hi Wu, >>>> >>>> That is really a p

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

2012-11-26 Thread Jianguo Wu
diff --git a/mm/sparse.c b/mm/sparse.c > index fac95f2..ab9d755 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -613,12 +613,13 @@ static inline struct page > *kmalloc_section_memmap(unsigned long pnum, int nid, > /* This will make the necessary allocations eventually. */ &g

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

2012-11-26 Thread Jianguo Wu
nfo about how much > at least memory kernel needs ? > As I know, bootmem is mostly used by page structs when CONFIG_SPARSEMEM=y. But it is hard to calculate how much bootmem is needed exactly. > > Thanks for the comments. :) > >> >> Thanks, >> Jianguo Wu >> >

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

2012-11-26 Thread Jianguo Wu
On 2012/11/27 14:49, Wen Congyang wrote: > 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 >&

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

2012-11-27 Thread Jianguo Wu
est as movable. How do you think ? > I think it's OK for now. > And, since we cannot figure out the minimum of memory kernel needs, I > think for now, we can just add some warning into kernel-parameters.txt. > > Thanks. :) > >> >> Thanks, >> Jianguo Wu

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

2012-11-28 Thread Jianguo Wu
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 think about this? Signed-off-by: Jianguo Wu Signed-o

Re: [RFT PATCH v2 4/5] mm: provide more accurate estimation of pages occupied by memmap

2012-11-28 Thread Jianguo Wu
present 3670016 managed 3585105 Thanks, Jianguo Wu >> If SPARSEMEM is enabled, it won't build page structures for >> non-existing pages (holes) within a zone, so provide a more accurate >> estimation of pages occupied by memmap if there are bigger holes within

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

2012-11-29 Thread Jianguo Wu
Hi Congyang, Thanks for your review and comments. On 2012/11/30 9:45, Wen Congyang wrote: > 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 thi

Re: [PATCH v6 08/15] memory-hotplug: Common APIs to support page tables hot-remove

2013-01-29 Thread Jianguo Wu
. When removing memory, the page structs of the revmoved memory are filled >> with 0FD. >> 2. All page structs are filled with 0xFD on PT/PMD, PT/PMD can be cleared. >> In this case, the page used as PT/PMD can be freed. >> >> Signed-off-by: Yasuaki I

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-31 Thread Jianguo Wu
On 2013/1/31 18:38, Simon Jeons wrote: > Hi Tang, > On Thu, 2013-01-31 at 17:44 +0800, Tang Chen wrote: >> Hi Simon, >> >> On 01/31/2013 04:48 PM, Simon Jeons wrote: >>> Hi Tang, >>> On Thu, 2013-01-31 at 15:10 +0800, Tang Chen wrote: >>> >>> 1. IIUC, there is a button on machine which supports ho

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-31 Thread Jianguo Wu
On 2013/2/1 9:36, Simon Jeons wrote: > On Fri, 2013-02-01 at 09:32 +0800, Jianguo Wu wrote: >> On 2013/1/31 18:38, Simon Jeons wrote: >> >>> Hi Tang, >>> On Thu, 2013-01-31 at 17:44 +0800, Tang Chen wrote: >>>> Hi Simon, >>>> >>>&g

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-31 Thread Jianguo Wu
On 2013/2/1 10:06, Simon Jeons wrote: > Hi Jianguo, > On Fri, 2013-02-01 at 09:57 +0800, Jianguo Wu wrote: >> On 2013/2/1 9:36, Simon Jeons wrote: >> >>> On Fri, 2013-02-01 at 09:32 +0800, Jianguo Wu wrote: >>>> On 2013/1/31 18:38, Simon Jeons wrote: >&

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

2012-10-31 Thread Jianguo Wu
RATE_ISOLATE)) { Hi Congyang, I think mt != MIGRATE_ISOLATE is always true here, page from PCP's migratetype < MIGRATE_PCPTYPES. When isolate page, we change pageblock's migratetype to MIGRATE_ISOLATE, but set_freepage_migratetype() isn't called. Maybe we can use mt = get_p

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

2012-10-29 Thread Jianguo Wu
On 2012/10/23 18:30, we...@cn.fujitsu.com wrote: > From: Yasuaki Ishimatsu > > When a memory is added, we update zone's and pgdat's start_pfn and > spanned_pages in the function __add_zone(). So we should revert them > when the memory is removed. > > The patch adds a new function __remove_zone()

Re: [PATCH v3 1/5] memblock: Introduce allocation direction to memblock.

2013-09-13 Thread Jianguo Wu
Hi Tang, On 2013/9/13 17:30, Tang Chen wrote: > The Linux kernel cannot migrate pages used by the kernel. As a result, kernel > pages cannot be hot-removed. So we cannot allocate hotpluggable memory for > the kernel. > > ACPI SRAT (System Resource Affinity Table) contains the memory hotplug info

[PATCH] mm/ksm: return NULL when doesn't get mergeable page

2013-09-16 Thread Jianguo Wu
In get_mergeable_page() local variable page is not initialized, it may hold a garbage value, when find_mergeable_vma() return NULL, get_mergeable_page() may return a garbage value to the caller. So initialize page as NULL. Signed-off-by: Jianguo Wu --- mm/ksm.c |2 +- 1 files changed, 1

[PATCH] mm/mempolicy: use NUMA_NO_NODE

2013-09-16 Thread Jianguo Wu
Use more appropriate NUMA_NO_NODE instead of -1 Signed-off-by: Jianguo Wu --- mm/mempolicy.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 4baf12e..4f73025 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1083,7

Re: [PATCH] mm/mempolicy: use NUMA_NO_NODE

2013-09-16 Thread Jianguo Wu
On 2013/9/17 0:19, KOSAKI Motohiro wrote: > (9/16/13 8:53 AM), Jianguo Wu wrote: >> Use more appropriate NUMA_NO_NODE instead of -1 >> >> Signed-off-by: Jianguo Wu >> --- >> mm/mempolicy.c | 10 +- >> 1 files changed, 5 insertions(+), 5 del

Re: [PATCH] mm/mempolicy: use NUMA_NO_NODE

2013-09-16 Thread Jianguo Wu
On 2013/9/17 4:26, Cody P Schafer wrote: > >> @@ -1802,11 +1802,11 @@ static inline unsigned interleave_nid(struct >> mempolicy *pol, >> >> /* >>* Return the bit number of a random bit set in the nodemask. >> - * (returns -1 if nodemask is empty) >> + * (returns NUMA_NO_NOD if nodemask is

[RESEND PATCH] mm/mempolicy: use NUMA_NO_NODE

2013-09-16 Thread Jianguo Wu
Use more appropriate NUMA_NO_NODE instead of -1 Signed-off-by: Jianguo Wu Acked-by: KOSAKI Motohiro --- mm/mempolicy.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 4baf12e..4f0cd20 100644 --- a/mm/mempolicy.c +++ b/mm

[PATCH] mm/thp: fix comments in transparent_hugepage_flags

2013-09-04 Thread Jianguo Wu
Since commit d39d33c332(thp: enable direct defrag), defrag is enable for all transparent hugepage page faults by default, not only in MADV_HUGEPAGE regions. Signed-off-by: Jianguo Wu --- mm/huge_memory.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mm/huge_memory.c

Re: [PATCH] mm/thp: fix comments in transparent_hugepage_flags

2013-09-04 Thread Jianguo Wu
Hi Wanpeng, On 2013/9/5 10:11, Wanpeng Li wrote: > Hi Jianguo, > On Wed, Sep 04, 2013 at 09:30:22PM +0800, Jianguo Wu wrote: >> Since commit d39d33c332(thp: enable direct defrag), defrag is enable >> for all transparent hugepage page faults by default, not only in >&g

Re: [PATCH] mm/thp: fix comments in transparent_hugepage_flags

2013-09-04 Thread Jianguo Wu
On 2013/9/5 11:37, Wanpeng Li wrote: > On Thu, Sep 05, 2013 at 11:04:22AM +0800, Jianguo Wu wrote: >> Hi Wanpeng, >> >> On 2013/9/5 10:11, Wanpeng Li wrote: >> >>> Hi Jianguo, >>> On Wed, Sep 04, 2013 at 09:30:22PM +0800, Jianguo Wu wrote: >>&

Re: [PATCH] mm/thp: fix comments in transparent_hugepage_flags

2013-09-04 Thread Jianguo Wu
On 2013/9/5 12:58, Wanpeng Li wrote: > Hi Jianguo, > On Thu, Sep 05, 2013 at 11:54:00AM +0800, Jianguo Wu wrote: >> On 2013/9/5 11:37, Wanpeng Li wrote: >> >>> On Thu, Sep 05, 2013 at 11:04:22AM +0800, Jianguo Wu wrote: >>>> Hi Wanpeng, >>>> >

[PATCH v2] mm/thp: fix stale comments of transparent_hugepage_flags

2013-09-05 Thread Jianguo Wu
hen TRANSPARENT_HUGEPAGE=y. And since commit d39d33c332(thp: enable direct defrag), defrag is enable for all transparent hugepage page faults by default, not only in MADV_HUGEPAGE regions. Signed-off-by: Jianguo Wu --- mm/huge_memory.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deleti

[PATCH v2][RESEND] mm/thp: fix stale comments of transparent_hugepage_flags

2013-09-05 Thread Jianguo Wu
hen TRANSPARENT_HUGEPAGE=y. And since commit d39d33c332(thp: enable direct defrag), defrag is enable for all transparent hugepage page faults by default, not only in MADV_HUGEPAGE regions. Signed-off-by: Jianguo Wu --- mm/huge_memory.c | 11 ++- 1 files changed, 6 insertions(+), 5 deleti

Re: [PATCH v2] mm/thp: fix stale comments of transparent_hugepage_flags

2013-09-05 Thread Jianguo Wu
Hi Wanpeng, Thanks for your review, but this patch has minor format problem, please see below. Please review the resend one, thanks. Thanks, Jianguo Wu On 2013/9/5 16:09, Wanpeng Li wrote: > On Thu, Sep 05, 2013 at 03:57:47PM +0800, Jianguo Wu wrote: >> Changelog: >> *v1 -> v

[PATCH 1/4] mm/vmalloc: use NUMA_NO_NODE

2013-08-29 Thread Jianguo Wu
Use more appropriate "if (node == NUMA_NO_NODE)" instead of "if (node < 0)" Signed-off-by: Jianguo Wu --- mm/vmalloc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 13a5495..f5483f8 100644 --- a/mm/vmall

[PATCH 2/4] mm/acpi: use NUMA_NO_NODE

2013-08-29 Thread Jianguo Wu
Use more appropriate NUMA_NO_NODE instead of -1 Signed-off-by: Jianguo Wu --- drivers/acpi/acpi_memhotplug.c |2 +- drivers/acpi/numa.c|4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c

[PATCH 3/4] x86/srat: use NUMA_NO_NODE

2013-08-29 Thread Jianguo Wu
setup_node() return NUMA_NO_NODE or valid node id(>=0), So use more appropriate "if (node == NUMA_NO_NODE)" instead of "if (node < 0)" Signed-off-by: Jianguo Wu --- arch/x86/mm/srat.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x

[PATCH 4/4] mm/arch: use NUMA_NODE

2013-08-29 Thread Jianguo Wu
Use more appropriate NUMA_NO_NODE instead of -1 in some archs' module_alloc() Signed-off-by: Jianguo Wu --- arch/arm/kernel/module.c|2 +- arch/arm64/kernel/module.c |2 +- arch/mips/kernel/module.c |2 +- arch/parisc/kernel/module.c |2 +- arch/s390/kernel/mod

[PATCH 1/5] mm/vmalloc: use N_MEMORY instead of N_HIGH_MEMORY

2013-08-29 Thread Jianguo Wu
instead. Signed-off-by: Jianguo Wu --- mm/vmalloc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 13a5495..1152947 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2573,7 +2573,7 @@ static void show_numa_info(struct seq_file *m, struct

[PATCH 2/5] mm/sparse: use N_MEMORY instead of N_HIGH_MEMORY

2013-08-29 Thread Jianguo Wu
instead. Signed-off-by: Jianguo Wu --- mm/sparse.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/sparse.c b/mm/sparse.c index 308d503..8519d6a 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -64,7 +64,7 @@ static struct mem_section noinline __init_refok

[PATCH 3/5] mm/vmemmap: use N_MEMORY instead of N_HIGH_MEMORY

2013-08-29 Thread Jianguo Wu
instead. Signed-off-by: Jianguo Wu --- mm/sparse-vmemmap.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index 27eeab3..ca8f46b 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c @@ -52,7 +52,7 @@ void * __meminit

[PATCH 4/5] mm/ia64: use N_MEMORY instead of N_HIGH_MEMORY

2013-08-29 Thread Jianguo Wu
instead. Signed-off-by: Jianguo Wu --- arch/ia64/kernel/uncached.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c index a96bcf8..d2e5545 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c

[PATCH 5/5] mm/cgroup: use N_MEMORY instead of N_HIGH_MEMORY

2013-08-29 Thread Jianguo Wu
Since commit 8219fc48a(mm: node_states: introduce N_MEMORY), we introduced N_MEMORY, now N_MEMORY stands for the nodes that has any memory, and N_HIGH_MEMORY stands for the nodes that has normal or high memory. The code here need to handle with the nodes which have memory, we should use N_MEMORY i

Re: [PATCH 5/5] mm/cgroup: use N_MEMORY instead of N_HIGH_MEMORY

2013-08-29 Thread Jianguo Wu
On 2013/8/30 11:44, Jianguo Wu wrote: > Since commit 8219fc48a(mm: node_states: introduce N_MEMORY), > we introduced N_MEMORY, now N_MEMORY stands for the nodes that has any memory, > and N_HIGH_MEMORY stands for the nodes that has normal or high memory. > > The code here need to

Re: [PATCH 5/5] mm/cgroup: use N_MEMORY instead of N_HIGH_MEMORY

2013-08-30 Thread Jianguo Wu
On 2013/8/30 15:41, Michal Hocko wrote: > On Fri 30-08-13 11:44:57, Jianguo Wu wrote: >> Since commit 8219fc48a(mm: node_states: introduce N_MEMORY), > > But this very same commit also says: > " > A.example 2) mm/page_cgroup.c use N_HIGH_MEMORY twice:

[PATCH] mm/vmalloc: use help function to get vmalloc area size

2013-08-30 Thread Jianguo Wu
Use get_vm_area_size() to get vmalloc area's actual size without guard page. Signed-off-by: Jianguo Wu --- mm/vmalloc.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 13a5495..abe13bc 100644 --- a/mm/vmalloc.c +++

Re: [PATCH] mm/vmalloc: use help function to get vmalloc area size

2013-08-30 Thread Jianguo Wu
On 2013/8/30 16:49, Wanpeng Li wrote: > On Fri, Aug 30, 2013 at 04:42:49PM +0800, Jianguo Wu wrote: >> Use get_vm_area_size() to get vmalloc area's actual size without guard page. >> > > Do you see this? > > http://marc.info/?l=linux-mm&m=137698172417316&

Re: [PATCH 1/5] mm/vmalloc: use N_MEMORY instead of N_HIGH_MEMORY

2013-08-30 Thread Jianguo Wu
On 2013/8/30 11:36, Jianguo Wu wrote: > Since commit 8219fc48a(mm: node_states: introduce N_MEMORY), > we introduced N_MEMORY, now N_MEMORY stands for the nodes that has any memory, > and N_HIGH_MEMORY stands for the nodes that has normal or high memory. > > The code here need to

Re: [PATCH 4/4] mm/arch: use NUMA_NODE

2013-08-30 Thread Jianguo Wu
Cc linux...@kvack.org On 2013/8/30 10:06, Jianguo Wu wrote: > Use more appropriate NUMA_NO_NODE instead of -1 in some archs' module_alloc() > > Signed-off-by: Jianguo Wu > --- > arch/arm/kernel/module.c|2 +- > arch/arm64/kernel/module.c |2 +- >

Re: [PATCH] mm/ksm: return NULL when doesn't get mergeable page

2013-09-21 Thread Jianguo Wu
On 2013/9/19 16:33, Petr Holasek wrote: > On Mon, 16 Sep 2013, Jianguo Wu wrote: >> In get_mergeable_page() local variable page is not initialized, >> it may hold a garbage value, when find_mergeable_vma() return NULL, >> get_mergeable_page() may return a garbage value to

[Resend with ACK][PATCH] mm/arch: use NUMA_NODE

2013-09-23 Thread Jianguo Wu
Use more appropriate NUMA_NO_NODE instead of -1 in all archs' module_alloc() Signed-off-by: Jianguo Wu Acked-by: Ralf Baechle --- arch/arm/kernel/module.c|2 +- arch/arm64/kernel/module.c |2 +- arch/mips/kernel/module.c |2 +- arch/parisc/kernel/module.c |2 +-

[Resend with ACK][PATCH] mm/arch: use NUMA_NO_NODE

2013-09-23 Thread Jianguo Wu
Use more appropriate NUMA_NO_NODE instead of -1 in all archs' module_alloc() Signed-off-by: Jianguo Wu Acked-by: Ralf Baechle --- arch/arm/kernel/module.c|2 +- arch/arm64/kernel/module.c |2 +- arch/mips/kernel/module.c |2 +- arch/parisc/kernel/module.c |2 +-

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

2012-12-02 Thread Jianguo Wu
Hi Congyang, This is the new version. Thanks, Jianguo Wu. Signed-off-by: Jianguo Wu Signed-off-by: Jiang Liu --- include/linux/mm.h |1 + mm/sparse-vmemmap.c | 231 +++ mm/sparse.c |3 +- 3 files changed, 234 insertions(+), 1

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

2012-12-04 Thread Jianguo Wu
Hi Tang, Thanks for your review and comments, Please see below for my reply. On 2012/12/4 17:13, Tang Chen wrote: > Hi Wu, > > Sorry to make noise here. Please see below. :) > > On 12/03/2012 10:23 AM, Jianguo Wu wrote: >> Signed-off-by: Jianguo Wu >&g

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

2012-12-04 Thread Jianguo Wu
Hi Tang, On 2012/12/5 10:07, Tang Chen wrote: > Hi Wu, > > On 12/04/2012 08:20 PM, Jianguo Wu wrote: > (snip) >>> >>> Seems that we have different ways to handle pages allocated by bootmem >>> or by regular allocator. Is the checking

Re: [PATCH v2 4/5] page_alloc: Make movablecore_map has higher priority

2012-12-05 Thread Jianguo Wu
Hi Tang, There is a bug in Gerry's patch, please apply this patch to fix it. --- mm/page_alloc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 41c3b51..d981810 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4383,7 +4383,

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

2012-12-06 Thread Jianguo Wu
Hi Tang, On 2012/12/7 9:42, Tang Chen wrote: > Hi Wu, > > I met some problems when I was digging into the code. It's very > kind of you if you could help me with that. :) > > If I misunderstood your code, please tell me. > Please see below. :) > > On 12/03

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

2012-12-06 Thread Jianguo Wu
ne, I used physical addresses in order to keep consistent with phys_pud[pmd/pte]_init(), So I think we should keep this. Thanks, Jianguo Wu > So, would you please tell me if we have to use physical addresses here ? > > Thanks. :) > >> + >> +for (; start< end; star

Re: [PATCH v3 3/5] page_alloc: Introduce zone_movable_limit[] to keep movable limit for nodes

2012-12-10 Thread Jianguo Wu
if (zone_movable_is_highmem() && Hi Tang, I think zone_movable_is_highmem() is not work correctly here. sanitize_zone_movable_limit zone_movable_is_highmem <--using movable_zone here find_zone_movable_pfns_for_nodes find_usabl

Re: [PATCH v3 3/5] page_alloc: Introduce zone_movable_limit[] to keep movable limit for nodes

2012-12-11 Thread Jianguo Wu
On 2012/12/11 20:24, Simon Jeons wrote: > On Tue, 2012-12-11 at 11:07 +0800, Jianguo Wu wrote: >> On 2012/12/11 10:33, Tang Chen wrote: >> >>> This patch introduces a new array zone_movable_limit[] to store the >>> ZONE_MOVABLE limit from movablecore_map b

Re: [PATCH v3 3/5] page_alloc: Introduce zone_movable_limit[] to keep movable limit for nodes

2012-12-11 Thread Jianguo Wu
On 2012/12/11 21:20, Simon Jeons wrote: > On Tue, 2012-12-11 at 20:41 +0800, Jianguo Wu wrote: >> On 2012/12/11 20:24, Simon Jeons wrote: >> >>> On Tue, 2012-12-11 at 11:07 +0800, Jianguo Wu wrote: >>>> On 2012/12/11 10:33, Tang Chen wrote: >>

[PATCH] mm/hugetlb: create hugetlb cgroup file in hugetlb_init

2012-12-12 Thread Jianguo Wu
off-by: Jianguo Wu Signed-off-by: Jiang Liu --- include/linux/hugetlb_cgroup.h |7 ++- mm/hugetlb.c | 11 +-- mm/hugetlb_cgroup.c| 23 +-- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/include/li

Re: [PATCH v5 06/14] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

2012-12-25 Thread Jianguo Wu
} else { > + next = pmd_addr_end(addr, end); > + > + pmd = pmd_offset(pud, addr); > + if (pmd_none(*pmd)) > + continue; > + get_page_bootmem(section_n

Re: [PATCH v5 08/14] memory-hotplug: Common APIs to support page tables hot-remove

2012-12-25 Thread Jianguo Wu
memory are filled > with 0FD. > 2. All page structs are filled with 0xFD on PT/PMD, PT/PMD can be cleared. > In this case, the page used as PT/PMD can be freed. > > Signed-off-by: Yasuaki Ishimatsu > Signed-off-by: Jianguo Wu > Signed-off-by: Wen Congyang >

Re: [Part3 PATCH v2 0/4] Support hot-remove local pagetable pages.

2013-06-16 Thread Jianguo Wu
Hi Tang, On 2013/6/13 21:03, Tang Chen wrote: > The following patch-set from Yinghai allocates pagetables to local nodes. > v1: https://lkml.org/lkml/2013/3/7/642 > v2: https://lkml.org/lkml/2013/3/10/47 > v3: https://lkml.org/lkml/2013/4/4/639 > v4: https://lkml.org/lkml/2013/4/11/829 > > Since

Re: [PATCH 2/2] mmap: allow MAP_HUGETLB for hugetlbfs files

2013-06-18 Thread Jianguo Wu
goto out; > + retval = -EINVAL; > + if (unlikely(flags & MAP_HUGETLB && !is_hugetlb_file(file))) We already have is_file_hugepages(). Thanks, Jianguo Wu > + goto out_fput; > } else if (flags & MAP_H

Re: [PATCH] mmap: allow MAP_HUGETLB for hugetlbfs files v2

2013-06-19 Thread Jianguo Wu
Hi Joern, I cannot apply this patch to Linus tree, as the code has been modified since commit af73e4d9506d ("hugetlbfs: fix mmap failure in unaligned size request"). Thanks, Jianguo Wu On 2013/6/20 0:25, Jörn Engel wrote: > It is counterintuitive at best that mmap'ing a h

Re: [PATCH 4/9] mm, hugetlb: fix and clean-up node iteration code to alloc or free

2013-07-16 Thread Jianguo Wu
\ > + node = hstate_next_node_to_alloc(hs, mask); \ > + nr_nodes > 0 && \ > + ((node = hstate_next_node_to_alloc(hs, mask)) || 1);\ Hi Joonsoo, For the first loop, no

mm/zbud: fix some trivial typos in comments

2013-08-02 Thread Jianguo Wu
Fix some trivial typos in comments. Signed-off-by: Jianguo Wu --- mm/zbud.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/zbud.c b/mm/zbud.c index ad1e781..9451361 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -16,7 +16,7 @@ * * zbud works by storing compressed

[PATCH] mm/mempolicy: return NULL if node is NUMA_NO_NODE in get_task_policy

2013-08-05 Thread Jianguo Wu
If node == NUMA_NO_NODE, pol is NULL, we should return NULL instead of do "if (!pol->mode)" check. Signed-off-by: Jianguo Wu --- mm/mempolicy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 4baf12e..e0e3398 100644 --- a/mm/mempoli

Re: [PATCH] mm/mempolicy: return NULL if node is NUMA_NO_NODE in get_task_policy

2013-08-06 Thread Jianguo Wu
Hi Andrew, On 2013/8/7 5:03, Andrew Morton wrote: > On Tue, 6 Aug 2013 12:06:56 +0800 Jianguo Wu wrote: > >> If node == NUMA_NO_NODE, pol is NULL, we should return NULL instead of >> do "if (!pol->mode)" check. >> >> Signed-off-by: Jianguo Wu

[PATCH] mm: remove unnecessary variable idx0 in __early_ioremap()

2013-08-12 Thread Jianguo Wu
After commit 8827247ffcc(x86: don't define __this_fixmap_does_not_exist()), variable idx0 is no longer needed, so just remove it. Signed-off-by: Jianguo Wu --- arch/x86/mm/ioremap.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/ioremap.c b/arch/x

Re: [PATCH 2/4] mem-hotplug: Skip LOCAL_NODE_DATA pages in memory offline procedure.

2013-05-24 Thread Jianguo Wu
if (magic == LOCAL_NODE_DATA) Hi Tang, I think can define this as a macro, and can be reused in the other places. Thanks, Jianguo Wu. > + continue; > + > /* >* We can't use page_count without pin a page >

Re: [PATCH 4/4] mem-hotplug: Do not free LOCAL_NODE_DATA pages to buddy system in hot-remove procedure.

2013-05-24 Thread Jianguo Wu
SECTION_INFO || magic == MIX_SECTION_INFO) { while (nr_pages--) put_page_bootmem(page++); - } else + } else if (magic != LOCAL_NODE_DATA) __free_pages_bootmem(page, order); } else

mm/hotplug: fix build warning when CONFIG_MEMORY_HOTREMOVE=n

2013-03-11 Thread Jianguo Wu
ock Signed-off-by: Jianguo Wu --- arch/x86/mm/init_64.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 474e28f..dafdeb2 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -1019,6 +1019,7 @@ void __ref vmemma

Re: [PATCH]mm/ia64: fix a node distance bug

2012-08-20 Thread Jianguo Wu
On 2012/8/20 15:06, Wen Congyang wrote: > At 08/20/2012 02:21 PM, wujianguo Wrote: >> From: Jianguo Wu >> >> Hi all, >> When doing memory-hot-plug, We found node distance is wrong after >> offline >> a node in IA64 platform. For example system has 4 no

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

2012-08-20 Thread Jianguo Wu
node.h: struct node { struct sys_device sysdev; #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HUGETLBFS) struct work_struct node_work; #endif }; Thanks Jianguo Wu > + memset(node_dev, 0, sizeof(struct node));

Re: [PATCH] mm/hugetlb: create hugetlb cgroup file in hugetlb_init

2012-12-12 Thread Jianguo Wu
On 2012/12/12 19:23, Michal Hocko wrote: > On Wed 12-12-12 18:44:13, Xishi Qiu wrote: >> On 2012/12/12 18:19, Michal Hocko wrote: >> >>> On Wed 12-12-12 16:25:59, Jianguo Wu wrote: >>>> Build kernel with CONFIG_HUGETLBFS=y,CONFIG_HUGETLB_PAGE=y >>&g

Re: [PATCH] mm/hugetlb: create hugetlb cgroup file in hugetlb_init

2012-12-12 Thread Jianguo Wu
On 2012/12/13 1:05, Aneesh Kumar K.V wrote: > Jianguo Wu writes: > >> Build kernel with CONFIG_HUGETLBFS=y,CONFIG_HUGETLB_PAGE=y >> and CONFIG_CGROUP_HUGETLB=y, then specify hugepagesz=xx boot option, >> system will boot fail. >> >> This fail

[PATCH v2] mm/hugetlb: create hugetlb cgroup file in hugetlb_init

2012-12-12 Thread Jianguo Wu
log: use huge_page_order(h) instead of h->order as suggesting by Aneesh add Reviewed-by and Acked-by Signed-off-by: Jianguo Wu Signed-off-by: Jiang Liu Reviewed-by: Aneesh Kumar K.V Acked-by: Michal Hocko --- include/linux/hugetlb_cgroup.h |7 ++- mm/hugetlb.c

[PATCH v2 UPDATE] mm/hugetlb: create hugetlb cgroup file in hugetlb_init

2012-12-12 Thread Jianguo Wu
log: do code refactor as suggesting by Aneesh add Reviewed-by and Acked-by Signed-off-by: Jianguo Wu Signed-off-by: Jiang Liu Reviewed-by: Aneesh Kumar K.V Acked-by: Michal Hocko --- include/linux/hugetlb_cgroup.h |7 ++- mm/hugetlb.c | 11 +--

Re: [PATCH v2 UPDATE] mm/hugetlb: create hugetlb cgroup file in hugetlb_init

2012-12-13 Thread Jianguo Wu
On 2012/12/13 21:56, Michal Hocko wrote: > On Thu 13-12-12 11:39:17, Jianguo Wu wrote: >> Build kernel with CONFIG_HUGETLBFS=y,CONFIG_HUGETLB_PAGE=y >> and CONFIG_CGROUP_HUGETLB=y, then specify hugepagesz=xx boot option, >> system will boot fail. >> >> This fa

Re: [PATCH v2] ARM: mm: support big-endian page tables

2014-03-18 Thread Jianguo Wu
Hi Russell, Cloud you please take a look at this? Thanks! On 2014/2/17 15:05, Jianguo Wu wrote: > When enable LPAE and big-endian in a hisilicon board, while specify > mem=384M mem=512M@7680M, will get bad page state: > > Freeing unused kernel memory: 180K (c0466000 - c0493000

Re: [question] how to figure out OOM reason? should dump slab/vmalloc info when OOM?

2014-02-10 Thread Jianguo Wu
On 2014/1/22 4:41, David Rientjes wrote: > On Tue, 21 Jan 2014, Jianguo Wu wrote: > >>> The problem is that slabinfo becomes excessively verbose and dumping it >>> all to the kernel log often times causes important messages to be lost. >>> This is why we cont

[PATCH] ARM: mm: support big-endian page tables

2014-02-11 Thread Jianguo Wu
e-endian, will store low 32-bit in r2, high 32-bit in r3; for big-endian, will store low 32-bit in r3, high 32-bit in r2, this will cause wrong pfn stored in pte, so we should exchange r2 and r3 for big-endian. Signed-off-by: Jianguo Wu --- arch/arm/mm/proc-v7-3level.S | 10 ++ 1 files ch

Re: [PATCH] ARM: mm: support big-endian page tables

2014-02-11 Thread Jianguo Wu
On 2014/2/11 18:40, Ben Dooks wrote: > On 11/02/14 09:20, Jianguo Wu wrote: >> When enable LPAE and big-endian in a hisilicon board, while specify >> mem=384M mem=512M@7680M, will get bad page state: >> >> Freeing unused kernel memory: 180K (c0466000 - c0493000) >&g

Re: [PATCH 2/2] mm: free memblock.memory in free_all_bootmem

2014-01-07 Thread Jianguo Wu
= get_allocated_memblock_memory_regions_info(&start); > + if (size) > + count += __free_memory_core(start, start + size); > + Hi Philipp, For some archs, like arm64, would use memblock.memory after system booting, so we can not simply released to the buddy alloca

[PATCH] mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfull

2013-12-12 Thread Jianguo Wu
: Jianguo Wu --- mm/memory-failure.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index b7c1716..e5567f2 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1471,7 +1471,8 @@ static int get_any_page(struct

Re: [PATCH] mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfull

2013-12-12 Thread Jianguo Wu
sta...@vger.kernel.org" > in patch description? > And please fix a typo in subject line. > OK, thanks for your tested! Thanks, Jianguo Wu > Thanks, > Naoya Horiguchi > > On Thu, Dec 12, 2013 at 09:14:05PM +0800, Jianguo Wu wrote: >> After a successful hugetlb page migra

[PATCH v2] mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfully

2013-12-12 Thread Jianguo Wu
Horiguchi Cc: sta...@vger.kernel.org Signed-off-by: Jianguo Wu --- mm/memory-failure.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index b7c1716..e5567f2 100644 --- a/mm/memory-failure.c +++ b/mm/memory

Re: [PATCH v2] mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfully

2013-12-12 Thread Jianguo Wu
Hi, On 2013/12/13 10:32, Naoya Horiguchi wrote: > On Fri, Dec 13, 2013 at 09:09:52AM +0800, Jianguo Wu wrote: >> After a successful hugetlb page migration by soft offline, the source page >> will either be freed into hugepage_freelists or buddy(over-commit page). If >>

[PATCH] mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfully

2013-12-12 Thread Jianguo Wu
] SMP So check PageHuge(page) after call migrate_pages() successfully. Tested-by: Naoya Horiguchi Cc: sta...@vger.kernel.org Signed-off-by: Jianguo Wu --- mm/memory-failure.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory

[PATCH] mm/hugetlb: check for pte NULL pointer in __page_check_address()

2013-12-16 Thread Jianguo Wu
In __page_check_address(), if address's pud is not present, huge_pte_offset() will return NULL, we should check the return value. Signed-off-by: Jianguo Wu --- mm/rmap.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index 55c8b8d..06

Re: [PATCH] mm/hugetlb: check for pte NULL pointer in __page_check_address()

2013-12-16 Thread Jianguo Wu
Hi Kirill, On 2013/12/16 22:25, Kirill A. Shutemov wrote: > Jianguo Wu wrote: >> In __page_check_address(), if address's pud is not present, >> huge_pte_offset() will return NULL, we should check the return value. >> >> Signed-off-by: Jianguo Wu > > Loo

Re: [PATCH v3] ARM: mm: support big-endian page tables

2014-04-23 Thread Jianguo Wu
On 2014/4/23 21:20, Will Deacon wrote: > Hi Jianguo, > > On Thu, Apr 17, 2014 at 10:43:01AM +0100, Marc Zyngier wrote: >> On Thu, Apr 17 2014 at 10:31:37 am BST, Jianguo Wu >> wrote: >>> When enable LPAE and big-endian in a hisilicon board, while specify >>

[PATCH] mm/kmemleak: add support for re-enable kmemleak at runtime

2014-01-17 Thread Jianguo Wu
Now disabling kmemleak is an irreversible operation, but sometimes we may need to re-enable kmemleak at runtime. So add a knob to enable kmemleak at runtime: echo on > /sys/kernel/debug/kmemleak Signed-off-by: Jianguo Wu --- Documentation/kmemleak.txt |3 ++- mm/kmemlea

Re: [PATCH] mm/kmemleak: add support for re-enable kmemleak at runtime

2014-01-18 Thread Jianguo Wu
On 2014/1/17 20:04, Catalin Marinas wrote: > On Fri, Jan 17, 2014 at 09:40:02AM +0000, Jianguo Wu wrote: >> Now disabling kmemleak is an irreversible operation, but sometimes >> we may need to re-enable kmemleak at runtime. So add a knob to enable >> kmemleak at runtime: >

[question] how to figure out OOM reason? should dump slab/vmalloc info when OOM?

2014-01-20 Thread Jianguo Wu
When OOM happen, will dump buddy free areas info, hugetlb pages info, memory state of all eligible tasks, per-cpu memory info. But do not dump slab/vmalloc info, sometime, it's not enough to figure out the reason OOM happened. So, my questions are: 1. Should dump slab/vmalloc info when OOM happen?

Re: [question] how to figure out OOM reason? should dump slab/vmalloc info when OOM?

2014-01-21 Thread Jianguo Wu
On 2014/1/21 13:34, David Rientjes wrote: > On Mon, 20 Jan 2014, Jianguo Wu wrote: > >> When OOM happen, will dump buddy free areas info, hugetlb pages info, >> memory state of all eligible tasks, per-cpu memory info. >> But do not dump slab/vmalloc info, sometime, it&#x

Re: [patch 00/11] userspace out of memory handling

2014-03-11 Thread Jianguo Wu
On 2014/3/6 10:52, David Rientjes wrote: > On Wed, 5 Mar 2014, Andrew Morton wrote: > >>> This patchset introduces a standard interface through memcg that allows >>> both of these conditions to be handled in the same clean way: users >>> define memory.oom_reserve_in_bytes to define the reserve an

Re: [PATCH] ARM: mm: support big-endian page tables

2014-02-15 Thread Jianguo Wu
Ping... On 2014/2/12 14:54, Jianguo Wu wrote: > On 2014/2/11 18:40, Ben Dooks wrote: > >> On 11/02/14 09:20, Jianguo Wu wrote: >>> When enable LPAE and big-endian in a hisilicon board, while specify >>> mem=384M mem=512M@7680M, will get bad page state: >>>

[PATCH v2] ARM: mm: support big-endian page tables

2014-02-16 Thread Jianguo Wu
e-endian, will store low 32-bit in r2, high 32-bit in r3; for big-endian, will store low 32-bit in r3, high 32-bit in r2, this will cause wrong pfn stored in pte, so we should exchange r2 and r3 for big-endian. Signed-off-by: Jianguo Wu --- arch/arm/mm/proc-v7-3level.S | 18 +-

Re: [PATCH 3.4 93/99] iwlwifi: always copy first 16 bytes of commands

2014-03-25 Thread Jianguo Wu
On 2014/3/25 17:29, Andreas Sturmlechner wrote: > Original Message from: Ben Hutchings >> >> One piece of my backport to 3.2.y went missing in the forward-port to >> 3.4.y. Can you test 3.4.83 with this patch on top? >> >> Ben. > > iwlwifi works with the additional patch, thanks :) > > > S

Re: [PATCH v2] ARM: mm: support big-endian page tables

2014-04-15 Thread Jianguo Wu
On 2014/4/14 19:14, Marc Zyngier wrote: > On 14/04/14 11:43, Will Deacon wrote: >> (catching up on old email) >> >> On Tue, Mar 18, 2014 at 07:35:59AM +, Jianguo Wu wrote: >>> Cloud you please take a look at this? >> >> [...] >> >>> On

  1   2   >