[PATCH v5 3/6] x86/mm: Factor out of top-down direct mapping setup

2013-09-24 Thread Zhang Yanfei
ways of pagetable setup into separate functions, and choose to use which way in init_mem_mapping, which makes the code more clear. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- arch/x86/mm/init.c | 58

[PATCH v5 4/6] x86/mem-hotplug: Support initialize page tables in bottom-up

2013-09-24 Thread Zhang Yanfei
of kernel image to the higher memory. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- arch/x86/mm/init.c | 64 ++- 1 files changed, 62 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm

[PATCH v5 5/6] x86, acpi, crash, kdump: Do reserve_crashkernel() after SRAT is parsed

2013-09-24 Thread Zhang Yanfei
. So reorder reserve_crashkernel() after SRAT is parsed. Acked-by: Tejun Heo t...@kernel.org Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- arch/x86/kernel/setup.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff

[PATCH v5 6/6] mem-hotplug: Introduce movablenode boot option

2013-09-24 Thread Zhang Yanfei
to lose their NUMA performance, just don't specify anything. The kernel will work as before. Suggested-by: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- Documentation/kernel-parameters.txt

Re: [PATCH v5 2/6] memblock: Introduce bottom-up allocation mode

2013-09-26 Thread Zhang Yanfei
Hello tejun, Thanks for your quick comments first:) On 09/26/2013 10:45 PM, Tejun Heo wrote: Hello, On Wed, Sep 25, 2013 at 02:27:48AM +0800, Zhang Yanfei wrote: +#ifdef CONFIG_MOVABLE_NODE +static inline void memblock_set_bottom_up(bool enable) +{ +memblock.bottom_up = enable

Re: [PATCH v5 3/6] x86/mm: Factor out of top-down direct mapping setup

2013-09-26 Thread Zhang Yanfei
On 09/26/2013 10:46 PM, Tejun Heo wrote: On Wed, Sep 25, 2013 at 02:29:06AM +0800, Zhang Yanfei wrote: +/** + * memory_map_top_down - Map [map_start, map_end) top down + * @map_start: start address of the target memory range + * @map_end: end address of the target memory range

Re: [PATCH v5 4/6] x86/mem-hotplug: Support initialize page tables in bottom-up

2013-09-26 Thread Zhang Yanfei
Hello tejun, On 09/26/2013 10:48 PM, Tejun Heo wrote: Hello, On Wed, Sep 25, 2013 at 02:30:51AM +0800, Zhang Yanfei wrote: +/** + * memory_map_bottom_up - Map [map_start, map_end) bottom up + * @map_start: start address of the target memory range + * @map_end: end address of the target

Re: [PATCH v5 5/6] x86, acpi, crash, kdump: Do reserve_crashkernel() after SRAT is parsed

2013-09-26 Thread Zhang Yanfei
On 09/26/2013 10:49 PM, Tejun Heo wrote: On Wed, Sep 25, 2013 at 02:34:34AM +0800, Zhang Yanfei wrote: From: Tang Chen tangc...@cn.fujitsu.com Memory reserved for crashkernel could be large. So we should not allocate this memory bottom up from the end of kernel image. When SRAT is parsed

Re: [PATCH v5 2/6] memblock: Introduce bottom-up allocation mode

2013-09-26 Thread Zhang Yanfei
On 09/26/2013 11:50 PM, Tejun Heo wrote: On Thu, Sep 26, 2013 at 11:37:34PM +0800, Zhang Yanfei wrote: + WARN_ONCE(1, memblock: Failed to allocate memory in bottom up + direction. Now try top down direction.\n); + } You and I would know what was going on and what

Re: [PATCH v5 4/6] x86/mem-hotplug: Support initialize page tables in bottom-up

2013-09-26 Thread Zhang Yanfei
On 09/26/2013 11:48 PM, Tejun Heo wrote: On Thu, Sep 26, 2013 at 11:43:02PM +0800, Zhang Yanfei wrote: As Yinghai pointed out in another thread, do we need to worry about falling back to top-down? I've explained to him. Nop, we don't need to worry about that. Because even the min_pfn_mapped

Re: [PATCH v5 6/6] mem-hotplug: Introduce movablenode boot option

2013-09-26 Thread Zhang Yanfei
On 09/26/2013 10:53 PM, Tejun Heo wrote: On Wed, Sep 25, 2013 at 02:35:14AM +0800, Zhang Yanfei wrote: From: Tang Chen tangc...@cn.fujitsu.com The hot-Pluggable field in SRAT specifies which memory is hotpluggable. As we mentioned before, if hotpluggable memory is used by the kernel

Re: [PATCH v5 2/6] memblock: Introduce bottom-up allocation mode

2013-09-26 Thread Zhang Yanfei
On 09/26/2013 11:37 PM, Zhang Yanfei wrote: Hello tejun, Thanks for your quick comments first:) On 09/26/2013 10:45 PM, Tejun Heo wrote: Hello, On Wed, Sep 25, 2013 at 02:27:48AM +0800, Zhang Yanfei wrote: +#ifdef CONFIG_MOVABLE_NODE +static inline void memblock_set_bottom_up(bool

Re: [PATCH v5 3/6] x86/mm: Factor out of top-down direct mapping setup

2013-09-26 Thread Zhang Yanfei
Hello tejun, On 09/26/2013 11:39 PM, Zhang Yanfei wrote: On 09/26/2013 10:46 PM, Tejun Heo wrote: On Wed, Sep 25, 2013 at 02:29:06AM +0800, Zhang Yanfei wrote: +/** + * memory_map_top_down - Map [map_start, map_end) top down + * @map_start: start address of the target memory range

Re: [PATCH v5 4/6] x86/mem-hotplug: Support initialize page tables in bottom-up

2013-09-26 Thread Zhang Yanfei
On 09/26/2013 10:48 PM, Tejun Heo wrote: Hello, On Wed, Sep 25, 2013 at 02:30:51AM +0800, Zhang Yanfei wrote: +/** + * memory_map_bottom_up - Map [map_start, map_end) bottom up + * @map_start: start address of the target memory range + * @map_end: end address of the target memory range

[PATCH -mm] mm, memory-hotpulg: Rename movablenode boot option to movable_node

2013-09-30 Thread Zhang Yanfei
From: Zhang Yanfei zhangyan...@cn.fujitsu.com Since we already has config MOVABLE_NODE, and the boot option movablenode is introduced as the boot-time switch to disable the effects of CONFIG_MOVABLE_NODE=y when the system is booting. So rename boot option movablenode to movable_node to match

Re: [PATCH -mm] mm, memory-hotpulg: Rename movablenode boot option to movable_node

2013-10-01 Thread Zhang Yanfei
Hello Ingo, On 10/01/2013 01:46 PM, Ingo Molnar wrote: * Zhang Yanfei zhangyanfei@gmail.com wrote: @@ -153,11 +153,18 @@ config MOVABLE_NODE help Allow a node to have only movable memory. Pages used by the kernel, such as direct mapping pages cannot be migrated

Re: [PATCH] x86, acpi: Remove out-of-date comment of __acpi_map_table

2013-07-23 Thread Zhang Yanfei
On 07/23/2013 05:22 PM, Ingo Molnar wrote: * Zhang Yanfei zhangyanfei@gmail.com wrote: From: Zhang Yanfei zhangyan...@cn.fujitsu.com The implementation of function __acpi_map_table() has been changed long time ago, and now it directly invokes early_ioremap() to setup the temporarily

[PATCH v2] x86, acpi: Correct out-of-date comment of __acpi_map_table

2013-07-23 Thread Zhang Yanfei
From: Zhang Yanfei zhangyan...@cn.fujitsu.com The implementation of function __acpi_map_table() has been changed long time ago, and now it directly invokes early_ioremap() to setup the temporarily acpi table mappings. So correct its out-of-date comment. Signed-off-by: Zhang Yanfei zhangyan

Re: [PATCH 01/10] mm, compaction: do not recheck suitable_migration_target under lock

2014-06-10 Thread Zhang Yanfei
done in isolate_freepages() without lock, and not pretend that the recheck under lock guarantees anything. It is just a heuristic after all. Signed-off-by: Vlastimil Babka vba...@suse.cz Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Cc: Minchan Kim minc...@kernel.org Cc: Mel Gorman

Re: [PATCH 05/10] mm, compaction: remember position within pageblock in free pages scanner

2014-06-10 Thread Zhang Yanfei
affecting success rates. Signed-off-by: Vlastimil Babka vba...@suse.cz Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Cc: Minchan Kim minc...@kernel.org Cc: Mel Gorman mgor...@suse.de Cc: Joonsoo Kim iamjoonsoo@lge.com Cc: Michal Nazarewicz min...@mina86.com Cc: Naoya Horiguchi n

Re: [PATCH 07/10] mm: rename allocflags_to_migratetype for clarity

2014-06-10 Thread Zhang Yanfei
it clear only. Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Acked-by: Minchan Kim minc...@kernel.org -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v2 05/10] DMA, CMA: support arbitrary bitmap granularity

2014-06-12 Thread Zhang Yanfei
description in first patch in this patchset. ;-) Yeah, not only in this patchset, I saw Joonsoo trying to unify all kinds of things in the MM. This is great for newbies, IMO. -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH v2 01/10] DMA, CMA: clean-up log message

2014-06-12 Thread Zhang Yanfei
add one more debug log on cma_activate_area(). Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c index 83969f8..bd0bb81 100644 --- a/drivers/base/dma

Re: [PATCH v2 02/10] DMA, CMA: fix possible memory leak

2014-06-12 Thread Zhang Yanfei
this patchset. Yeah, I also like the idea. After all, this patchset aims to a general CMA management, we could improve more after this patchset. So Acked-by: Zhang Yanfei zhangyan...@cn.fujitsu.com -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH v2 05/10] DMA, CMA: support arbitrary bitmap granularity

2014-06-12 Thread Zhang Yanfei
granularity for following generalization. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Zhang Yanfei zhangyan...@cn.fujitsu.com diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c index bc4c171..9bc9340 100644 --- a/drivers/base/dma-contiguous.c +++ b/drivers

Re: [PATCH v2 06/10] CMA: generalize CMA reserved area management functionality

2014-06-12 Thread Zhang Yanfei
-by: Michal Nazarewicz min...@mina86.com Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Zhang Yanfei zhangyan...@cn.fujitsu.com diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 00e13ce..4eac559 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -283,16

Re: [PATCH v2 08/10] mm, cma: clean-up cma allocation error path

2014-06-12 Thread Zhang Yanfei
On 06/12/2014 11:21 AM, Joonsoo Kim wrote: We can remove one call sites for clear_cma_bitmap() if we first call it before checking error number. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com diff --git a/mm/cma.c b/mm/cma.c index

Re: [PATCH 0/8] mm: add page cache limit and reclaim feature

2014-06-16 Thread Zhang Yanfei
insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ . -- Thanks. Zhang

Re: [patch 7/9] mm: thrash detection-based file cache sizing

2014-01-14 Thread Zhang Yanfei
. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: + mm-vmalloc-remove-useless-variable-in-vmap_block.patch added to -mm tree

2013-08-07 Thread Zhang Yanfei
liw...@linux.vnet.ibm.com Acked-by: Johannes Weiner han...@cmpxchg.org Acked-by: Zhang Yanfei zhangyan...@cn.fujitsu.con s/zhangyan...@cn.fujitsu.con/zhangyan...@cn.fujitsu.com/g Signed-off-by: Andrew Morton a...@linux-foundation.org --- mm/vmalloc.c |2 -- 1 file changed, 2 deletions

Re: + mm-vmalloc-use-well-defined-find_last_bit-func.patch added to -mm tree

2013-08-07 Thread Zhang Yanfei
() for this purpose and its performance may be slightly better than current implementation. So change it. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Reviewed-by: Wanpeng Li liw...@linux.vnet.ibm.com Acked-by: Johannes Weiner han...@cmpxchg.org Acked-by: Zhang Yanfei zhangyan...@cn.fujitsu.con s

Re: [PATCH 1/2] mm: Disable zone_reclaim_mode by default

2014-04-07 Thread Zhang Yanfei
to know they need zone_reclaim_mode will detect it. Signed-off-by: Mel Gorman mgor...@suse.de Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- Documentation/sysctl/vm.txt | 17 + mm/page_alloc.c | 2 -- 2 files changed, 9 insertions(+), 10 deletions

Re: [PATCH 2/2] mm: page_alloc: Do not cache reclaim distances

2014-04-07 Thread Zhang Yanfei
, the zone_reclaim_mode() path is already slow and it is the path that takes the hit. Signed-off-by: Mel Gorman mgor...@suse.de Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- include/linux/mmzone.h | 1 - mm/page_alloc.c| 15 +-- 2 files changed, 1 insertion(+), 15

Re: [PATCH v3] support madvise(MADV_FREE)

2014-04-07 Thread Zhang Yanfei
(pgsteal_kswapd) -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] mm/swap: cleanup *lru_cache_add* functions

2014-04-20 Thread Zhang Yanfei
of lru_cache_add() + * have the page added to the active list using mark_page_accessed(). */ void lru_cache_add(struct page *page) { -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH] mm/swap: cleanup *lru_cache_add* functions

2014-04-21 Thread Zhang Yanfei
On 04/21/2014 12:02 PM, Jianyu Zhan wrote: Hi, Yanfei, On Mon, Apr 21, 2014 at 9:00 AM, Zhang Yanfei zhangyan...@cn.fujitsu.com wrote: What should be exported? lru_cache_add() lru_cache_add_anon() lru_cache_add_file() It seems you only export lru_cache_add_file() in the patch

Re: [PATCH v4] mm: support madvise(MADV_FREE)

2014-04-14 Thread Zhang Yanfei
would be general allocators(ex, jemalloc, tcmalloc and hope glibc supports it) and jemalloc/tcmalloc already have supported the feature for other OS(ex, FreeBSD) Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com barrios@blaptop:~/benchmark/ebizzy$ lscpu Architecture: x86_64 CPU

Re: [RFC PATCH] memory driver: make phys_index/end_phys_index reflect the start/end section number

2014-04-09 Thread Zhang Yanfei
the change is basically ok. So Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Only one nitpick below. -Nathan --- Documentation/memory-hotplug.txt | 113 --- 1 file changed, 59 insertions(+), 54 deletions(-) Index: linux/Documentation/memory

Re: [RFC PATCH] memory driver: make phys_index/end_phys_index reflect the start/end section number

2014-04-09 Thread Zhang Yanfei
to present the last section number of a memory block (for end_section_nr), but what he did in the patch seems not matching the log. So what is the motivation of adding this 'end_phys_index' file here? Confused. -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH v3 0/5] hugetlb: add support gigantic page allocation at runtime

2014-04-14 Thread Zhang Yanfei
Clear explanation and implementation! Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com On 04/11/2014 01:58 AM, Luiz Capitulino wrote: [Full introduction right after the changelog] Changelog - v3 - Dropped unnecessary WARN_ON() call [Kirill] - Always check if the pfn range

Re: [RFC PATCH v2] memory-hotplug: Update documentation to hide information about SECTIONS and remove end_phys_index

2014-04-14 Thread Zhang Yanfei
be the same as phys_index. So it is removed here. Signed-off-by: Li Zhong zh...@linux.vnet.ibm.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Still the nitpick there. --- Documentation/memory-hotplug.txt | 125 +++--- drivers/base/memory.c

[PATCH] madvise: Correct the comment of MADV_DODUMP flag

2014-04-01 Thread Zhang Yanfei
s/MADV_NODUMP/MADV_DONTDUMP/ Signed-off-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- include/uapi/asm-generic/mman-common.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/uapi/asm-generic/mman-common.h b/include/uapi/asm-generic/mman-common.h index 4164529

Re: [RFC PATCH] memory driver: make phys_index/end_phys_index reflect the start/end section number

2014-04-02 Thread Zhang Yanfei
://www.tux.org/lkml/ -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [RFC PATCH] memory driver: make phys_index/end_phys_index reflect the start/end section number

2014-04-02 Thread Zhang Yanfei
On 04/03/2014 10:37 AM, Li Zhong wrote: On Thu, 2014-04-03 at 09:37 +0800, Zhang Yanfei wrote: Add ccing On 04/02/2014 04:56 PM, Li Zhong wrote: I noticed the phys_index and end_phys_index under /sys/devices/system/memory/memoryXXX/ have the same value, e.g. (for the test machine, one

[PATCH] mm, slab: Drop unnecessary slabp-inuse cachep-num test

2013-07-01 Thread Zhang Yanfei
From: Zhang Yanfei zhangyan...@cn.fujitsu.com In function cache_alloc_refill, we have used BUG_ON to ensure that slabp-inuse is less than cachep-num before the while test. And in the while body, we do not change the value of slabp-inuse and cachep-num, so it is not necessary to test if slabp

Re: [PATCH] mm, slab: Drop unnecessary slabp-inuse cachep-num test

2013-07-01 Thread Zhang Yanfei
Sorry for making noise. I've made a mistake and please ignore this patch. On 07/02/2013 12:29 AM, Zhang Yanfei wrote: From: Zhang Yanfei zhangyan...@cn.fujitsu.com In function cache_alloc_refill, we have used BUG_ON to ensure that slabp-inuse is less than cachep-num before the while test

[PATCH] x86, mm: Move declarations level3_ident_pgt and level2_ident_pgt into CONFIG_XEN

2013-07-02 Thread Zhang Yanfei
From: Zhang Yanfei zhangyan...@cn.fujitsu.com After commit 8170e6b (x86, 64bit: Use a #PF handler to materialize early mappings on demand), we don't define level3_ident_pgt and level2_ident_pgt if !CONFIG_XEN. So move the two variables' declaration into CONFIG_XEN. Signed-off-by: Zhang Yanfei

Re: [PATCH v3 05/13] mm, compaction: report compaction as contended only due to lock contention

2014-06-23 Thread Zhang Yanfei
-- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v3 01/13] mm, THP: don't hold mmap_sem in khugepaged when allocating THP

2014-06-22 Thread Zhang Yanfei
the for loop to get the next vma and handle it. Does we do this without holding the mmap_sem in any mode? And if the loop end, we have another up_read in breakouterloop. What if we have released the mmap_sem in collapse_huge_page()? -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line

Re: [PATCH v3 02/13] mm, compaction: defer each zone individually instead of preferred zone

2014-06-23 Thread Zhang Yanfei
: Joonsoo Kim iamjoonsoo@lge.com Cc: Michal Nazarewicz min...@mina86.com Cc: Naoya Horiguchi n-horigu...@ah.jp.nec.com Cc: Christoph Lameter c...@linux.com Cc: Rik van Riel r...@redhat.com Cc: David Rientjes rient...@google.com Really good. Reviewed-by: Zhang Yanfei zhangyan

Re: [PATCH v3 04/13] mm, compaction: move pageblock checks up from isolate_migratepages_range()

2014-06-23 Thread Zhang Yanfei
clean-up to make code more clear. Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Only a tiny nit-pick below. --- mm/compaction.c | 112 +--- 1 file changed, 59 insertions(+), 53 deletions(-) diff --git a/mm/compaction.c b/mm

Re: [PATCH v3 05/13] mm, compaction: report compaction as contended only due to lock contention

2014-06-23 Thread Zhang Yanfei
. How long could we increase latency for temporal allocation for HUGEPAGE_ALWAYS system? -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH v3 06/13] mm, compaction: periodically drop lock and restore IRQs in scanners

2014-06-23 Thread Zhang Yanfei
rient...@google.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- mm/compaction.c | 114 1 file changed, 73 insertions(+), 41 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index e8cfac9..40da812 100644

Re: [PATCH v3 07/13] mm, compaction: skip rechecks when lock was already held

2014-06-23 Thread Zhang Yanfei
Lameter c...@linux.com Cc: Rik van Riel r...@redhat.com Acked-by: David Rientjes rient...@google.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- mm/compaction.c | 53 +++-- 1 file changed, 31 insertions(+), 22 deletions(-) diff

Re: [PATCH v3 08/13] mm, compaction: remember position within pageblock in free pages scanner

2014-06-23 Thread Zhang Yanfei
...@ah.jp.nec.com Cc: Christoph Lameter c...@linux.com Cc: Rik van Riel r...@redhat.com Cc: Zhang Yanfei zhangyan...@cn.fujitsu.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- mm/compaction.c | 40 +++- 1 file changed, 31 insertions(+), 9

Re: [PATCH v3 09/13] mm, compaction: skip buddy pages by their order in the migrate scanner

2014-06-23 Thread Zhang Yanfei
...@linux.com Cc: Rik van Riel r...@redhat.com Cc: David Rientjes rient...@google.com Fair enough. Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- mm/compaction.c | 36 +++- mm/internal.h | 16 +++- 2 files changed, 46 insertions(+), 6

Re: [PATCH v3 11/13] mm, compaction: pass gfp mask to compact_control

2014-06-23 Thread Zhang Yanfei
Lameter c...@linux.com Cc: Rik van Riel r...@redhat.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- mm/compaction.c | 12 +++- mm/internal.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 32c768b

Re: [PATCH v3 01/13] mm, THP: don't hold mmap_sem in khugepaged when allocating THP

2014-06-23 Thread Zhang Yanfei
On 06/23/2014 05:52 PM, Vlastimil Babka wrote: On 06/23/2014 07:39 AM, Zhang Yanfei wrote: Hello On 06/21/2014 01:45 AM, Kirill A. Shutemov wrote: On Fri, Jun 20, 2014 at 05:49:31PM +0200, Vlastimil Babka wrote: When allocating huge page for collapsing, khugepaged currently holds mmap_sem

Re: [PATCH v10 1/7] mm: support madvise(MADV_FREE)

2014-07-07 Thread Zhang Yanfei
the implementation has been changed. It also remove the page from the swapcache if it is. Thank you for your effort! -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v11 1/7] mm: support madvise(MADV_FREE)

2014-07-08 Thread Zhang Yanfei
Evans j...@fb.com Cc: Zhang Yanfei zhangyan...@cn.fujitsu.com Acked-by: Rik van Riel r...@redhat.com Signed-off-by: Minchan Kim minc...@kernel.org A quick respin, looks good to me now for this !THP part. And looks neat with the Pagewalker. Acked-by: Zhang Yanfei zhangyan...@cn.fujitsu.com

Re: [PATCH v11 2/7] x86: add pmd_[dirty|mkclean] for THP

2014-07-08 Thread Zhang Yanfei
...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: x...@kernel.org Acked-by: Kirill A. Shutemov kirill.shute...@linux.intel.com Signed-off-by: Minchan Kim minc...@kernel.org Acked-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- arch/x86/include/asm/pgtable.h | 10

Re: [PATCH 0/5] memory-hotplug: suitable memory should go to ZONE_MOVABLE

2014-07-18 Thread Zhang Yanfei
++ arch/x86/mm/init_64.c | 10 -- 5 files changed, 35 insertions(+), 7 deletions(-) -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH] CMA/HOTPLUG: clear buffer-head lru before page migration

2014-07-18 Thread Zhang Yanfei
allocation used for hugetlb is using alloc_contig_range(.. MIGRATE_MOVABLE). Thanks. -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 1/5] mm/slab_common: move kmem_cache definition to internal header

2014-08-21 Thread Zhang Yanfei
kmem_cache_size(struct kmem_cache *s) +{ + return s-object_size; +} + #ifdef CONFIG_DEBUG_VM static int kmem_cache_sanity_check(const char *name, size_t size) { -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH 0/6] mm/hugetlb: gigantic hugetlb page pools shrink supporting

2014-08-21 Thread Zhang Yanfei
majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ . -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v2 0/8] fix freepage count problems in memory isolation

2014-08-06 Thread Zhang Yanfei
/internal.h |5 + mm/page_alloc.c| 223 +- mm/page_isolation.c| 292 +++- 4 files changed, 368 insertions(+), 154 deletions(-) -- Thanks. Zhang Yanfei -- To unsubscribe from

Re: [PATCH v2 1/8] mm/page_alloc: correct to clear guard attribute in DEBUG_PAGEALLOC

2014-08-06 Thread Zhang Yanfei
. One more thing, I did in this patch, is that fixing freepage accounting. If we clear guard page and link it onto isolate buddy list, we should not increase freepage count. Acked-by: Vlastimil Babka vba...@suse.cz Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Reviewed-by: Zhang Yanfei

Re: [PATCH v2 3/8] mm/page_alloc: fix pcp high, batch management

2014-08-06 Thread Zhang Yanfei
) - pageset_set_high_and_batch(zone, - per_cpu_ptr(zone-pageset, cpu)); + pageset_get_values(zone, high, batch); + pageset_update(zone, high, batch); mutex_unlock(pcp_batch_high_lock); } #endif -- Thanks. Zhang Yanfei -- To unsubscribe from this list

Re: [RFC PATCH v3 3/3] mm/compaction: enhance compaction finish condition

2015-02-02 Thread Zhang Yanfei
Hello, At 2015/2/2 18:20, Vlastimil Babka wrote: On 02/02/2015 08:15 AM, Joonsoo Kim wrote: Compaction has anti fragmentation algorithm. It is that freepage should be more than pageblock order to finish the compaction if we don't find any freepage in requested migratetype buddy list. This is

Re: [RFC PATCH v3 2/3] mm/page_alloc: factor out fallback freepage checking

2015-02-02 Thread Zhang Yanfei
Hello Joonsoo, At 2015/2/2 15:15, Joonsoo Kim wrote: This is preparation step to use page allocator's anti fragmentation logic in compaction. This patch just separates fallback freepage checking part from fallback freepage management part. Therefore, there is no functional change.

Re: [PATCH 2/5] mm, compaction: simplify handling restart position in free pages scanner

2015-01-20 Thread Zhang Yanfei
Hello, 在 2015/1/19 18:05, Vlastimil Babka 写道: Handling the position where compaction free scanner should restart (stored in cc-free_pfn) got more complex with commit e14c720efdd7 (mm, compaction: remember position within pageblock in free pages scanner). Currently the position is updated in

Re: [PATCH 3/5] mm, compaction: encapsulate resetting cached scanner positions

2015-01-20 Thread Zhang Yanfei
-by: Vlastimil Babka vba...@suse.cz Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Should the new function be inline? Thanks. Cc: Minchan Kim minc...@kernel.org Cc: Mel Gorman mgor...@suse.de Cc: Joonsoo Kim iamjoonsoo@lge.com Cc: Michal Nazarewicz min...@mina86.com Cc: Naoya

Re: [PATCH 1/5] mm, compaction: more robust check for scanners meeting

2015-01-20 Thread Zhang Yanfei
@lge.com Signed-off-by: Vlastimil Babka vba...@suse.cz Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com Cc: Minchan Kim minc...@kernel.org Cc: Mel Gorman mgor...@suse.de Cc: Joonsoo Kim iamjoonsoo@lge.com Cc: Michal Nazarewicz min...@mina86.com Cc: Naoya Horiguchi n-horigu

Re: [RFC PATCH 4/5] mm, compaction: allow scanners to start at any pfn within the zone

2015-01-20 Thread Zhang Yanfei
pageblock and the operation of scanners is thus unchanged. The actual pivot changing is done by the next patch. Signed-off-by: Vlastimil Babka vba...@suse.cz I read through the whole patch, and you can feel free to add: Acked-by: Zhang Yanfei zhangyan...@cn.fujitsu.com I agree with you

Re: [PATCH] CMA: treat free cma pages as non-free if not ALLOC_CMA on watermark checking

2015-01-20 Thread Zhang Yanfei
Hello Minchan, How are you? 在 2015/1/19 14:55, Minchan Kim 写道: Hello, On Sun, Jan 18, 2015 at 04:32:59PM +0800, Hui Zhu wrote: From: Hui Zhu zhu...@xiaomi.com The original of this patch [1] is part of Joonsoo's CMA patch series. I made a patch [2] to fix the issue of this patch. Joonsoo

Re: [PATCH v3] mm: incorporate read-only pages into transparent huge pages

2015-01-28 Thread Zhang Yanfei
Hello 在 2015/1/28 8:27, Andrea Arcangeli 写道: On Tue, Jan 27, 2015 at 07:39:13PM +0200, Ebru Akagunduz wrote: diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 817a875..17d6e59 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2148,17 +2148,18 @@ static int

Re: [PATCH v3] mm: incorporate read-only pages into transparent huge pages

2015-01-28 Thread Zhang Yanfei
of page_count() below to trylock_page() (Andrea Arcangeli) Changes in v3: - Add a at-least-one-writable-pte check (Zhang Yanfei) - Debug page count (Vlastimil Babka, Andrea Arcangeli) - Increase read-only pte counter if pte is none (Andrea Arcangeli) I've written down test results: With the patch

Re: [PATCH v2 4/4] mm/compaction: enhance compaction finish condition

2015-01-31 Thread Zhang Yanfei
At 2015/1/30 20:34, Joonsoo Kim wrote: From: Joonsoo iamjoonsoo@lge.com Compaction has anti fragmentation algorithm. It is that freepage should be more than pageblock order to finish the compaction if we don't find any freepage in requested migratetype buddy list. This is for mitigating

Re: [PATCH v2 2/4] mm/compaction: stop the isolation when we isolate enough freepage

2015-01-30 Thread Zhang Yanfei
code on release_freepages(), but, it has no good effect. Anyway, this patch reduces waste time to isolate unneeded freepages so seems reasonable. Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com IMHO, the patch making the free scanner move slower makes both scanners meet further. Before

Re: [PATCH v2 1/4] mm/compaction: fix wrong order check in compact_finished()

2015-01-30 Thread Zhang Yanfei
Kim iamjoonsoo@lge.com Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index b68736c..4954e19 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1173,7

Re: [PATCH] mm: incorporate read-only pages into transparent huge pages

2015-01-25 Thread Zhang Yanfei
Hello 在 2015/1/25 17:25, Vlastimil Babka 写道: On 23.1.2015 20:18, Andrea Arcangeli wrote: +if (!pte_write(pteval)) { +if (++ro khugepaged_max_ptes_none) +goto out_unmap; +} It's true this is maxed out at 511, so there must be at least one

Re: [PATCH v2 2/4] mm/compaction: stop the isolation when we isolate enough freepage

2015-01-31 Thread Zhang Yanfei
At 2015/1/31 16:31, Vlastimil Babka wrote: On 01/31/2015 08:49 AM, Zhang Yanfei wrote: Hello, At 2015/1/30 20:34, Joonsoo Kim wrote: Reviewed-by: Zhang Yanfei zhangyan...@cn.fujitsu.com IMHO, the patch making the free scanner move slower makes both scanners meet further. Before this patch

Re: [PATCH v2 3/4] mm/page_alloc: separate steal decision from steal behaviour part

2015-01-31 Thread Zhang Yanfei
At 2015/1/30 20:34, Joonsoo Kim wrote: From: Joonsoo iamjoonsoo@lge.com This is preparation step to use page allocator's anti fragmentation logic in compaction. This patch just separates steal decision part from actual steal behaviour part so there is no functional change.

[PATCH] sysfs: fix compile warning in i386

2013-04-02 Thread Zhang Yanfei
This patch fixes compile warning in i386: drivers/base/cpu.c: In function 'show_crash_notes_size': drivers/base/cpu.c:142:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat] Reported-by: kbuild test robot Signed-off-by: Zhang

Re: [PATCH v2 RESEND 13/18] x86, numa, mem_hotplug: Skip all the regions the kernel resides in.

2013-08-05 Thread Zhang Yanfei
gain. Maybe our mail client does have some problem. We will check tomorrow when we go to our company since we are at night now And could you please kindly help reviewing other memblock and bootstrap related patches, so we could have a discussion with you and come to an agreement as soon as possib

Re: [PATCH] kexec: remove unnecessary return

2013-08-06 Thread Zhang Yanfei
pace)) 1475 return parse_crashkernel_mem(ck_cmdline, system_ram, 1476 crash_size, crash_base); 1478 return parse_crashkernel_simple(ck_cmdline, crash_size, crash_base); seems better. -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH V2] kexec: remove unnecessary return

2013-08-06 Thread Zhang Yanfei
于 2013/8/6 16:35, Xishi Qiu 写道: > Code can not run here forever, so remove the unnecessary return. > > Signed-off-by: Xishi Qiu > Suggested-by: Zhang Yanfei Reviewed-by: Zhang Yanfei > --- > kernel/kexec.c |5 + > 1 files changed, 1 insertions(+), 4 deletio

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

2013-08-21 Thread Zhang Yanfei
obviously near the kernel image range) to store the found ACPI tables. -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: + mm-vmalloc-remove-useless-variable-in-vmap_block.patch added to -mm tree

2013-08-07 Thread Zhang Yanfei
lock > > vbq in vmap_block isn't used. So remove it. > > Signed-off-by: Joonsoo Kim > Reviewed-by: Wanpeng Li > Acked-by: Johannes Weiner > Acked-by: Zhang Yanfei s/zhangyan...@cn.fujitsu.con/zhangyan...@cn.fujitsu.com/g > Signed-off-by: Andrew Morton > --- >

Re: + mm-vmalloc-use-well-defined-find_last_bit-func.patch added to -mm tree

2013-08-07 Thread Zhang Yanfei
unc > > Our intention in here is to find last_bit within the region to flush. > There is well-defined function, find_last_bit() for this purpose and its > performance may be slightly better than current implementation. So change > it. > > Signed-off-by: Joonsoo Kim > Reviewed-by:

Re: [PATCH 1/5] page_isolation: Fix a comment typo in test_pages_isolated()

2013-06-20 Thread Zhang Yanfei
all pages are free or Marked as ISOLATED */ > + /* Check all pages are free or marked as ISOLATED */ > zone = page_zone(page); > spin_lock_irqsave(>lock, flags); > ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn, -- Thanks. Zhang Yanfei -- To unsubscrib

Re: [PATCH] mm: fix overflow in alloc_vmap_area

2013-06-20 Thread Zhang Yanfei
> If after addition the result is smaller than one of the arguments, > then an overflow occurred. In our case there is an obvious overflow. > > Signed-off-by: Ghennadi Procopciuc > Cc: Daniel Baluta > > --- > Don't know if this is the right solution, but the bug happens for

Re: [PATCH] mm: fix overflow in alloc_vmap_area

2013-06-20 Thread Zhang Yanfei
On 06/21/2013 06:51 AM, Daniel Baluta wrote: > On Thu, Jun 20, 2013 at 7:59 PM, Zhang Yanfei > wrote: >> On 06/20/2013 11:12 PM, Ghennadi Procopciuc wrote: >>> Inserting the following kernel module: >>> >>> >>> >>> static

Re: [PATCH 3/4] mm/migrate: remove putback_lru_pages, fix comment on putback_movable_pages

2013-12-06 Thread Zhang Yanfei
> + list_del(>lru); > + dec_zone_page_state(page, NR_ISOLATED_ANON + > + page_is_file_cache(page)); > + putback_lru_page(page); > + } > putback_lru_pages(); > isolated = 0; > } else > -- Thanks. Zhang Yanfei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] x86, 64bit: Fix a possible bug in switchover in head_64.S

2013-05-13 Thread Zhang Yanfei
From: Zhang Yanfei In head_64.S, a switchover has been used to handle kernel crossing 1G, 512G boundaries. And commit 8170e6bed465b4b0c7687f93e9948aca4358a33b x86, 64bit: Use a #PF handler to materialize early mappings on demand said: During the switchover in head_64.S, before #PF

Re: [PATCH] x86, 64bit: Fix a possible bug in switchover in head_64.S

2013-05-14 Thread Zhang Yanfei
于 2013年05月14日 13:51, Yinghai Lu 写道: > On Mon, May 13, 2013 at 5:37 AM, Zhang Yanfei > wrote: >> From: Zhang Yanfei > >> It seems line 119 has a potential bug there. For example, >> the kernel is loaded at physical address 511G+1008M, that is >>

[PATCH v2] x86, 64bit: Fix a possible wraparound bug in switchover in head_64.S

2013-05-14 Thread Zhang Yanfei
-by: Zhang Yanfei Signed-off-by: Yinghai Lu Cc: sta...@vger.kernel.org --- -v2: make the change simpler and avoid using jmp --- arch/x86/kernel/head_64.S |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 08f7e80

[PATCH] x86, 64bit: Drop unneeded include

2013-05-14 Thread Zhang Yanfei
arch/x86/boot/compressed/head_64.S includes and but it doesn't look like it needs them. So remove them. Signed-off-by: Zhang Yanfei Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar --- arch/x86/boot/compressed/head_64.S |2 -- 1 files changed, 0 insertions(+), 2

[PATCH] x86, 64bit: Correct phys_addr in cleanup_highmap comment

2013-05-14 Thread Zhang Yanfei
For x86_64, we have phys_base, which means the delta between the the address kernel is actually running at and the address kernel is compiled to run at. Not phys_addr so correct it. Signed-off-by: Zhang Yanfei --- arch/x86/mm/init_64.c |2 +- 1 files changed, 1 insertions(+), 1 deletions

Re: [PATCH] x86: mm: Remove unnecessary assignment for max_pfn_mapped

2013-05-14 Thread Zhang Yanfei
于 2013年05月10日 22:57, Yinghai Lu 写道: > On Fri, May 10, 2013 at 3:28 AM, Zhang Yanfei > wrote: >> 于 2013年05月10日 17:27, Yinghai Lu 写道: >>> On Fri, May 10, 2013 at 2:01 AM, Zhang Yanfei >>> wrote: >>>> init_memory_mapping will s

<    1   2   3   4   5   6   7   8   >