[PATCH 13/18] driver: tty: serial: remove cast for kzalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kzalloc return value. Signed-off-by: Zhang Yanfei Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Andrew Morton Cc: linux-ser...@vger.kernel.org --- drivers/tty/serial/icom.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/icom.c b

[PATCH 14/18] driver: tty: vt: remove cast for kmalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kmalloc return value. Signed-off-by: Zhang Yanfei Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Andrew Morton --- drivers/tty/vt/consolemap.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c index

[PATCH 15/18] driver: usb: storage: remove cast for kmalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kmalloc return value. Signed-off-by: Zhang Yanfei Cc: Matthew Dharm Cc: Greg Kroah-Hartman Cc: Andrew Morton Cc: linux-...@vger.kernel.org Cc: usb-stor...@lists.one-eyed-alien.net --- drivers/usb/storage/isd200.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions

[PATCH 16/18] fs: befs: remove cast for kmalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kmalloc return value. Signed-off-by: Zhang Yanfei Cc: Andrew Morton --- fs/befs/btree.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index a66c9b1..74e397d 100644 --- a/fs/befs/btree.c +++ b/fs/befs/btree.c

[PATCH 17/18] fs: ufs: remove cast for kmalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kmalloc return value. Signed-off-by: Zhang Yanfei Cc: Evgeniy Dushistov Cc: Andrew Morton --- fs/ufs/util.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/ufs/util.c b/fs/ufs/util.c index 95425b5..b6c2f94 100644 --- a/fs/ufs/util.c +++ b/fs/ufs

[PATCH 18/18] net: sctp: remove cast for kmalloc/kzalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kmalloc/kzalloc return value. Signed-off-by: Zhang Yanfei Cc: Vlad Yasevich Cc: Sridhar Samudrala Cc: Neil Horman Cc: Andrew Morton Cc: linux-s...@vger.kernel.org --- include/net/sctp/sctp.h |2 +- net/sctp/protocol.c |2 +- 2 files changed, 2 insertions(+), 2

[PATCH] mmap: find_vma: remove the WARN_ON_ONCE(!mm) check

2013-03-13 Thread Zhang Yanfei
Remove the WARN_ON_ONCE(!mm) check as the comment suggested. Kernel code calls find_vma only when it is absolutely sure that the mm_struct arg to it is non-NULL. Signed-off-by: Zhang Yanfei Cc: Andrew Morton --- mm/mmap.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v2] net: fix functions and variables related to netns_ipvs->sysctl_sync_qlen_max

2013-02-17 Thread Zhang Yanfei
+reclaimable+file function for > NORMAL zone. > >> Redarding this patch: >> net-change-type-of-netns_ipvs-sysctl_sync_qlen_max.patch and >> net-fix-functions-and-variables-related-to-netns_ipvs-sysctl_sync_qlen_max.patch >> are joined at the hip and should be redone as a single patc

[PATCH] IPVS: change type of netns_ipvs->sysctl_sync_qlen_max

2013-02-19 Thread Zhang Yanfei
From: Zhang Yanfei This member of struct netns_ipvs is calculated from nr_free_buffer_pages so change its type to unsigned long in case of overflow. Also, type of its related proc var sync_qlen_max and the return type of function sysctl_sync_qlen_max() should be changed to unsigned long, too

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

2014-01-14 Thread Zhang Yanfei
>>>> + *the active list, shrinking the inactive list by one slot. This >>>> + *also slides all inactive pages that were faulted into the cache >>>> + *more recently than the activated page towards the tail of the >>>> + *inactive lis

[PATCH 2/2] Documentation: Add ABI entry for crash_notes and crash_notes_size

2013-03-28 Thread Zhang Yanfei
Add an Documentation/ABI entry for /sys/devices/system/cpu/cpu0/crash_notes and /sys/devices/system/cpu/cpu0/crash_notes_size. Cc: Greg KH Cc: "Eric W. Biederman" Cc: Vivek Goyal Signed-off-by: Zhang Yanfei --- Documentation/ABI/testing/sysfs-devices-system-cpu | 12 +++

[PATCH 1/2] sysfs: Add crash_notes_size to export percpu note size

2013-03-28 Thread Zhang Yanfei
parse it intead of using 1024. The idea came from Vivek Goyal. And a later patch will be sent to kexec-tools to let it parse the size. Cc: Greg KH Cc: "Eric W. Biederman" Cc: Vivek Goyal Signed-off-by: Zhang Yanfei --- drivers/base/cpu.c | 14 ++ 1 files changed, 14

Re: [PATCH 1/2] sysfs: Add crash_notes_size to export percpu note size

2013-03-28 Thread Zhang Yanfei
Hi, simon I forgot to add your email in the CC, could you please help reviewing this patch since I will send the kexec-tools patch if this patch is accepted. Thanks Zhang 于 2013年03月28日 16:15, Zhang Yanfei 写道: > For percpu notes, we are exporting only address and not size. So > the use

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

2013-07-01 Thread Zhang Yanfei
From: Zhang Yanfei 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->inuse <

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 > > In function cache_alloc_refill, we have used BUG_ON to ensure > that slabp->inuse is less than cachep->num before the while > t

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

2013-07-02 Thread Zhang Yanfei
From: Zhang Yanfei 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 --- arch/x

Re: [RESEND][PATCH] x86, relocs: move ELF relocation handling to C

2013-07-02 Thread Zhang Yanfei
N - 1)) &\ > - ~(CONFIG_PHYSICAL_ALIGN - 1)) > - > -#define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) > #define __START_KERNEL_map _AC(0x8000, UL) > > /* See Documentation/x86/x86_64/mm.

Re: [RFC PATCH 0/5] Support multiple pages allocation

2013-07-03 Thread Zhang Yanfei
wn > come from? I guess, it might be: for one page allocation at once, comparing to the original code, this patch adds two parameters nr_pages and pages and will do extra checks for the parameter nr_pages in the allocation path. > > [...] -- Thanks. Zhang Yanfei -- To unsubscribe from this

Re: [RFC PATCH 0/5] Support multiple pages allocation

2013-07-03 Thread Zhang Yanfei
On 07/03/2013 11:51 PM, Zhang Yanfei wrote: > On 07/03/2013 11:28 PM, Michal Hocko wrote: >> On Wed 03-07-13 17:34:15, Joonsoo Kim wrote: >> [...] >>> For one page allocation at once, this patchset makes allocator slower than >>> before (-5%). >> >&g

Re: [RFC] mm: Honor min_free_kbytes set by user

2013-07-04 Thread Zhang Yanfei
d. > > This patch saves the user defined value and allows updating > min_free_kbytes only if it is higher than the saved one. > > A warning is printed when the new value is ignored. Looks reasonable. Acked-by: Zhang Yanfei > > Signed-off-by: Michal Hocko > --- > mm/

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

2014-06-10 Thread Zhang Yanfei
> it's simpler to just rely on the check 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 Reviewed-by: Zhang Yanfei > Cc: Minchan Kim > Cc: Mel Go

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

2014-06-10 Thread Zhang Yanfei
per migrate > page, to 2.25 free pages per migrate page, without affecting success rates. > > Signed-off-by: Vlastimil Babka Reviewed-by: Zhang Yanfei > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi >

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

2014-06-10 Thread Zhang Yanfei
dd the detailed function description to make it clear only. Reviewed-by: Zhang Yanfei > > Acked-by: Minchan Kim > -- 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 ma

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

2014-06-12 Thread Zhang Yanfei
mutex_lock(>lock); >> -bitmap_clear(cma->bitmap, pfn - cma->base_pfn, count); >> -mutex_unlock(>lock); >> -} >> - >> /** >> * dma_alloc_from_contiguous() - allocate pages from contiguous area >> * @dev: Pointer to device for

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

2014-06-12 Thread Zhang Yanfei
me consistently. > > Lastly, I add one more debug log on cma_activate_area(). > > Signed-off-by: Joonsoo Kim Reviewed-by: Zhang Yanfei > > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 83969f8..bd0bb81 100644 > --- a/drivers/base/dm

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

2014-06-12 Thread Zhang Yanfei
aningful error message like what was successful zone and what is >> new zone and failed pfn number? > > What I want to do in early phase of this patchset is to make cma code > on DMA APIs similar to ppc kvm's cma code. ppc kvm's cma code already > has this error hand

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

2014-06-12 Thread Zhang Yanfei
trary bitmap granularity for following generalization. > > Signed-off-by: Joonsoo Kim Acked-by: Zhang Yanfei > > 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/base/

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

2014-06-12 Thread Zhang Yanfei
l change in DMA APIs. > > v2: There is no big change from v1 in mm/cma.c. Mostly renaming. > > Acked-by: Michal Nazarewicz > Signed-off-by: Joonsoo Kim Acked-by: Zhang Yanfei > > diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig > index 00e13ce..4eac559 100644 >

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 Reviewed-by: Zhang Yanfei > > diff --git a/mm/cma.c b/mm/cma.c > index 1e1b017..01a0713 10

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

2014-04-02 Thread 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/ > -- Thanks. Zhan

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

[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 --- 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..ddc3b36 100644

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

2014-04-20 Thread Zhang Yanfei
__lru_cache_add(page); > +} > +EXPORT_SYMBOL(lru_cache_add_file); > > /** > * lru_cache_add - add a page to a page list > * @page: the page to be added to the LRU. > + * > + * Queue the page for addition to the LRU via pagevec. The decision on > whether > + *

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 > wrote: >> What should be exported? >> >> lru_cache_add() >> lru_cache_add_anon() >> lru_cache_add_file() >> >> It seems you onl

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

2014-06-22 Thread Zhang Yanfei
Please, move up_read() outside khugepaged_alloc_page(). > I might be wrong. If we up_read in khugepaged_scan_pmd(), then if we round again do 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 anoth

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

2014-06-23 Thread Zhang Yanfei
e, > and DMA32 zones on both nodes were thus not considered for compaction. > > Signed-off-by: Vlastimil Babka > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel >

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

2014-06-23 Thread Zhang Yanfei
nc compaction. > > Signed-off-by: Vlastimil Babka > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel > Cc: David Rientjes I think this is a good clean-up to make

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

2014-06-23 Thread Zhang Yanfei
;> - * need_resched() true during async >> - * compaction >> - */ >> +enum compact_contended contended; /* Signal need_sched() or lock >> +

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

2014-06-23 Thread Zhang Yanfei
. The lock contention > avoidance for async compaction is achieved by the periodical unlock by > compact_unlock_should_abort() and by using trylock in > compact_trylock_irqsave() > and aborting when trylock fails. Sync compaction does not use trylock. > > Signed-off-by: Vlastimil Babk

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

2014-06-23 Thread Zhang Yanfei
> Cc: Rik van Riel > Acked-by: David Rientjes Reviewed-by: Zhang Yanfei > --- > mm/compaction.c | 53 +++-- > 1 file changed, 31 insertions(+), 22 deletions(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index 40d

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

2014-06-23 Thread Zhang Yanfei
per migrate > page, to 2.25 free pages per migrate page, without affecting success rates. > > Signed-off-by: Vlastimil Babka > Acked-by: David Rientjes > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Chri

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

2014-06-23 Thread Zhang Yanfei
d gracefully. > + * > + * ACCESS_ONCE is used so that if the caller assigns the result into a local > + * variable and e.g. tests it for valid range before using, the compiler > cannot > + * decide to remove the variable and inline the page_private(page) multiple > + * times, p

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

2014-06-23 Thread Zhang Yanfei
> Signed-off-by: David Rientjes > Signed-off-by: Vlastimil Babka > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel Reviewed-by: Zhang Yanfei > --- > mm/compa

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

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

2014-06-23 Thread Zhang Yanfei
LATE_ABORT > return COMPACT_PARTIAL with *contended = cc.contended == > COMPACT_CONTENDED_LOCK (1) > COMPACTFAIL > if (contended_compaction && gfp_mask & __GFP_NO_KSWAPD) > no goto nopage because contended_compaction was false by (1) > > __alloc_pages_direct_reclaim

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

2014-07-07 Thread Zhang Yanfei
f > the range. This should be updated because 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 mess

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

2014-07-08 Thread Zhang Yanfei
max: 37266.00 > min: 22108.00min: 34149.00 > > In summary, MADV_FREE is about 2 time faster than MADV_DONTNEED. > > Cc: Michael Kerrisk > Cc: Linux API > Cc: Hugh Dickins > Cc: Johannes Weiner > Cc: KOSAKI Motohiro > Cc: Mel Gorman > Cc: J

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

2014-07-08 Thread Zhang Yanfei
c: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: x...@kernel.org > Acked-by: Kirill A. Shutemov > Signed-off-by: Minchan Kim Acked-by: Zhang Yanfei > --- > arch/x86/include/asm/pgtable.h | 10 ++ > 1 file changed, 10 insertions(+) &

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

2014-06-16 Thread Zhang Yanfei
- > 7 files changed, 248 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-in

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

2014-07-18 Thread Zhang Yanfei
emory-hotplug: sh: suitable memory should go to ZONE_MOVABLE > memory-hotplug: powerpc: suitable memory should go to ZONE_MOVABLE > > arch/ia64/mm/init.c | 7 +++ > arch/powerpc/mm/mem.c | 6 ++ > arch/sh/mm/init.c | 13 - > arch/x86/mm/init_32.c |

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

2014-07-18 Thread Zhang Yanfei
f it really makes sense to check the migratetype here. This >> check >> doesn't add any new information to the code and make false impression that >> this >> function can be called for other migratetypes than CMA or MOVABLE. Even if >> so, >> then invalidating bh_lrus unconditionally will make more sense, IMHO. > > I agree. I cannot understand why alloc_contig_range has an argument of > migratetype. > Can the alloc_contig_range is called for other migrate type than CMA/MOVABLE? > > What do you think about removing the argument of migratetype and > checking migratetype (if (migratetype == MIGRATE_CMA || migratetype == > MIGRATE_MOVABLE))? > Remove the checking only. Because gigantic page 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-info.html Please read the FAQ at http://www.tux.org/lkml/

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

2014-08-06 Thread Zhang Yanfei
on.h |2 + > mm/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 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 v2 1/8] mm/page_alloc: correct to clear guard attribute in DEBUG_PAGEALLOC

2014-08-06 Thread Zhang Yanfei
page. This may make code more understandable. > > 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 > Signed-off-by: Jo

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, , ); > + pageset_update(zone, high, batch); > } > out: > mutex_unlock(_batch_hi

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

2014-08-21 Thread Zhang Yanfei
> +#endif > + > +#ifdef CONFIG_SLUB > +#include > +#endif > + > /* > * State of the slab allocator. > * > diff --git a/mm/slab_common.c b/mm/slab_common.c > index d319502..2088904 100644 > --- a/mm/slab_common.c > +++ b/mm/slab_common.c > @@ -30,6 +30,1

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

2014-08-21 Thread Zhang Yanfei
in >> the body to majord...@kvack.org. For more info on Linux MM, >> see: http://www.linux-mm.org/ . >> Don't email: mailto:"d...@kvack.org;> em...@kvack.org > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body

[PATCH 0/3] x86: clear vmcss on all cpus when doing kdump if necessary

2012-10-12 Thread Zhang Yanfei
Currently, kdump just makes all the logical processors leave VMX operation by executing VMXOFF instruction, so any VMCSs active on the logical processors may be corrupted. But, sometimes, we need the VMCSs to debug guest images contained in the host vmcore. To prevent the corruption, we should

[PATCH 1/3] x86/kexec: clear vmcss on all cpus if necessary

2012-10-12 Thread Zhang Yanfei
This patch provides an alternative way to clear vmcss related to guests on all cpus when doing kdump. Signed-off-by: zhangyanfei --- arch/x86/include/asm/kexec.h |3 +++ arch/x86/kernel/crash.c | 23 +++ 2 files changed, 26 insertions(+), 0 deletions(-) diff

[PATCH 2/3] KVM: make crash_clear_loaded_vmcss valid when kvm_intel is loaded

2012-10-12 Thread Zhang Yanfei
Signed-off-by: zhangyanfei --- arch/x86/kvm/vmx.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4ff0ab9..f6a16b2 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -41,6 +41,7 @@ #include #include

[PATCH 3/3] sysctl: introduce a new interface to control kdump-vmcs-clear behaviour

2012-10-12 Thread Zhang Yanfei
This patch exports the variable clear_loaded_vmcs_enabled to userspace. Signed-off-by: zhangyanfei --- Documentation/sysctl/kernel.txt |8 kernel/sysctl.c | 10 ++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git

Re: [PATCH v9 1/2] x86/kexec: VMCLEAR VMCSs loaded on all cpus if necessary

2012-12-04 Thread Zhang Yanfei
于 2012年12月05日 04:14, Eric W. Biederman 写道: > Zhang Yanfei writes: > >> This patch provides a way to VMCLEAR VMCSs related to guests >> on all cpus before executing the VMXOFF when doing kdump. This >> is used to ensure the VMCSs in the vmcore updated and >>

[PATCH v10 0/2] x86: vmclear vmcss on all cpus when doing kdump if necessary

2012-12-05 Thread Zhang Yanfei
ove the sysctl and clear VMCSs unconditionally. Zhang Yanfei (2): x86/kexec: VMCLEAR VMCSs loaded on all cpus if necessary KVM-INTEL: provide the vmclear function and a bitmap to support VMCLEAR in kdump arch/x86/include/asm/kexec.h |2 + arch/x86/kernel/crash.c |

[PATCH v10 1/2] x86/kexec: VMCLEAR VMCSs loaded on all cpus if necessary

2012-12-05 Thread Zhang Yanfei
This patch provides a way to VMCLEAR VMCSs related to guests on all cpus before executing the VMXOFF when doing kdump. This is used to ensure the VMCSs in the vmcore updated and non-corrupted. Signed-off-by: Zhang Yanfei --- arch/x86/include/asm/kexec.h |2 ++ arch/x86/kernel/crash.c

Re: [PATCH v10 2/2] KVM-INTEL: provide the vmclear function and a bitmap to support VMCLEAR in kdump

2012-12-05 Thread Zhang Yanfei
The vmclear function will be assigned to the callback function pointer when loading kvm-intel module. And the bitmap indicates whether we should do VMCLEAR operation in kdump. The bits in the bitmap are set/unset according to different conditions. Signed-off-by: Zhang Yanfei --- arch/x86/kvm

[PATCH v11 0/2] x86: vmclear vmcss on all cpus when doing kdump if necessary

2012-12-06 Thread Zhang Yanfei
ove unnecessary conditions in function cpu_emergency_clear_loaded_vmcss as Marcelo suggested. Changelog from v1 to v2: 1. remove the sysctl and clear VMCSs unconditionally. Zhang Yanfei (2): x86/kexec: VMCLEAR VMCSs loaded on all cpus if necessary KVM-INTEL: provide the vmclear funct

[PATCH v11 1/2] x86/kexec: VMCLEAR VMCSs loaded on all cpus if necessary

2012-12-06 Thread Zhang Yanfei
From: Zhang Yanfei This patch provides a way to VMCLEAR VMCSs related to guests on all cpus before executing the VMXOFF when doing kdump. This is used to ensure the VMCSs in the vmcore updated and non-corrupted. Signed-off-by: Zhang Yanfei Acked-by: Eric W. Biederman --- arch/x86/include/asm

Re: [PATCH v11 2/2] KVM-INTEL: provide the vmclear function and a bitmap to support VMCLEAR in kdump

2012-12-06 Thread Zhang Yanfei
From: Zhang Yanfei The vmclear function will be assigned to the callback function pointer when loading kvm-intel module. And the bitmap indicates whether we should do VMCLEAR operation in kdump. The bits in the bitmap are set/unset according to different conditions. Signed-off-by: Zhang Yanfei

[PATCH] x86/kexec: crash_vmclear_local_vmcss needs __rcu

2012-12-06 Thread Zhang Yanfei
This removes the sparse warning: arch/x86/kernel/crash.c:49:32: sparse: incompatible types in comparison expression (different address spaces) Reported-by: kbuild test robot Signed-off-by: Zhang Yanfei --- arch/x86/include/asm/kexec.h |4 +++- arch/x86/kernel/crash.c |4 ++-- 2

[PATCH] binfmt_elf: remove unused argument in fill_elf_header

2012-12-09 Thread Zhang Yanfei
In function fill_elf_header, elf->e_ident[EI_OSABI] is always set to ELF_OSABI, so remove the unused argument 'osabi'. Signed-off-by: Zhang Yanfei --- fs/binfmt_elf.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index fbd9

Re: [PATCH] x86/kexec: crash_vmclear_local_vmcss needs __rcu

2012-12-11 Thread Zhang Yanfei
于 2012年12月11日 04:30, Marcelo Tosatti 写道: > On Fri, Dec 07, 2012 at 01:40:56PM +0800, Zhang Yanfei wrote: >> This removes the sparse warning: >> arch/x86/kernel/crash.c:49:32: sparse: incompatible types in comparison >> expression (different address spaces) >> >&g

Re: [PATCH] x86/kexec: crash_vmclear_local_vmcss needs __rcu

2012-12-11 Thread Zhang Yanfei
于 2012年12月11日 16:10, Gleb Natapov 写道: > On Tue, Dec 11, 2012 at 04:04:55PM +0800, Zhang Yanfei wrote: >> 于 2012年12月11日 04:30, Marcelo Tosatti 写道: >>> On Fri, Dec 07, 2012 at 01:40:56PM +0800, Zhang Yanfei wrote: >>>> This removes the sparse warning: >>>

[PATCH] [RESEND] x86/kexec: crash_vmclear_local_vmcss needs __rcu

2012-12-11 Thread Zhang Yanfei
This removes the sparse warning: arch/x86/kernel/crash.c:49:32: sparse: incompatible types in comparison expression (different address spaces) Reported-by: kbuild test robot Signed-off-by: Zhang Yanfei --- arch/x86/include/asm/kexec.h |3 ++- arch/x86/kernel/crash.c |4 ++-- 2

[PATCH] KEXEC: Get rid of duplicate check for hole_end

2013-01-29 Thread Zhang Yanfei
hole_end has been checked to make sure it is <= crash_res.end in the while condition check, so the if condition check is duplicate. Signed-off-by: Zhang Yanfei --- kernel/kexec.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/kernel/kexec.c b/kernel/kexec.c in

[PATCH] MAINTAINERS: fix arch/arm/plat-omap/include/plat/omap_hwmod.h

2013-01-09 Thread Zhang Yanfei
This file was moved to arch/arm/mach-omap2/omap_hwmod.h by commit 2a296c8 (ARM: OMAP: Make plat/omap_hwmod.h local to mach-omap2). Signed-off-by: Zhang Yanfei --- MAINTAINERS |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 915564e

[PATCH] MAINTAINERS: fix a status pattern

2013-01-09 Thread Zhang Yanfei
Change MAINTAINED to Maintained. Signed-off-by: Zhang Yanfei --- MAINTAINERS |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index c4f15a1..33d8f95 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -648,7 +648,7 @@ F: arch/arm/ ARM SUB

[PATCH] Documention/x86: fix arch/x86/include/asm/bootparam.h

2013-01-10 Thread Zhang Yanfei
This file is now arch/x86/include/uapi/asm/bootparam.h. Signed-off-by: Zhang Yanfei --- Documentation/x86/zero-page.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt index cf5437d..9723e2a 100644

Re: [PATCH v8 0/2] x86: vmclear vmcss on all cpus when doing kdump if necessary

2012-11-25 Thread Zhang Yanfei
于 2012年11月25日 22:26, Gleb Natapov 写道: > On Thu, Nov 22, 2012 at 04:22:26PM +0800, Zhang Yanfei wrote: >> Currently, kdump just makes all the logical processors leave VMX operation by >> executing VMXOFF instruction, so any VMCSs active on the logical processors >>

Re: [PATCH v8 0/2] x86: vmclear vmcss on all cpus when doing kdump if necessary

2012-11-25 Thread Zhang Yanfei
Hello Eric Would you help review the patch, and give some comments, please ? Thanks Zhang 于 2012年11月22日 16:22, Zhang Yanfei 写道: > Currently, kdump just makes all the logical processors leave VMX operation by > executing VMXOFF instruction, so any VMCSs active on the logical processors

Re: [PATCH v8 1/2] x86/kexec: add a new atomic notifier list for kdump

2012-11-26 Thread Zhang Yanfei
于 2012年11月27日 02:18, Eric W. Biederman 写道: > Gleb Natapov writes: > >> On Mon, Nov 26, 2012 at 11:43:10AM -0600, Eric W. Biederman wrote: >>> Gleb Natapov writes: >>> >>>> On Mon, Nov 26, 2012 at 09:08:54AM -0600, Eric W. Biederman wrote: >>>&g

Re: [PATCH v8 1/2] x86/kexec: add a new atomic notifier list for kdump

2012-11-26 Thread Zhang Yanfei
于 2012年11月27日 09:49, Eric W. Biederman 写道: > Zhang Yanfei writes: > >> So in summary, >> >> 1. a specific callback function instead of a notifier? > > Yes. > >> 2. Instead of calling vmclear_local_loaded_vmcss, the vmclear operation >>wil

[PATCH v9 0/2] x86: vmclear vmcss on all cpus when doing kdump if necessary

2012-11-26 Thread Zhang Yanfei
ble vmclear_skipped to skip vmclear in kdump in some conditions. Changelog from v2 to v3: 1. remove unnecessary conditions in function cpu_emergency_clear_loaded_vmcss as Marcelo suggested. Changelog from v1 to v2: 1. remove the sysctl and clear VMCSs unconditionally. Zhang Yanfei (2): x86/ke

[PATCH v9 1/2] x86/kexec: VMCLEAR VMCSs loaded on all cpus if necessary

2012-11-26 Thread Zhang Yanfei
This patch provides a way to VMCLEAR VMCSs related to guests on all cpus before executing the VMXOFF when doing kdump. This is used to ensure the VMCSs in the vmcore updated and non-corrupted. Signed-off-by: Zhang Yanfei --- arch/x86/include/asm/kexec.h |2 ++ arch/x86/kernel/crash.c

[PATCH v9 2/2] KVM-INTEL: provide the vmclear function and a bitmap to support VMCLEAR in kdump

2012-11-26 Thread Zhang Yanfei
The vmclear function will be assigned to the callback function pointer when loading kvm-intel module. And the bitmap indicates whether we should do VMCLEAR operation in kdump. The bits in the bitmap are set/unset according to different conditions. Signed-off-by: Zhang Yanfei --- arch/x86/kvm

Re: [PATCH 0/3] x86: clear vmcss on all cpus when doing kdump if necessary

2012-10-18 Thread Zhang Yanfei
于 2012年10月18日 18:55, Avi Kivity 写道: > On 10/18/2012 03:12 AM, Zhang Yanfei wrote: >> 于 2012年10月17日 18:16, Avi Kivity 写道: >>> On 10/17/2012 04:28 AM, Zhang Yanfei wrote: >>>> 于 2012年10月15日 23:43, Avi Kivity 写道: >>>>> On 10/12/2012 08:40 AM, Zhang Yanfei

[PATCH v2 0/2] x86: clear vmcss on all cpus when doing kdump if necessary

2012-10-18 Thread Zhang Yanfei
Currently, kdump just makes all the logical processors leave VMX operation by executing VMXOFF instruction, so any VMCSs active on the logical processors may be corrupted. But, sometimes, we need the VMCSs to debug guest images contained in the host vmcore. To prevent the corruption, we should

[PATCH 1/2] x86/kexec: VMCLEAR vmcss on all cpus if necessary

2012-10-18 Thread Zhang Yanfei
This patch provides a way to VMCLEAR vmcss related to guests on all cpus before executing the VMXOFF when doing kdump. This is used to ensure the VMCSs in the vmcore updated and non-corrupted. Signed-off-by: zhangyanfei --- arch/x86/include/asm/kexec.h |2 ++ arch/x86/kernel/crash.c |

[PATCH 2/2] KVM: make crash_clear_loaded_vmcss valid when loading kvm_intel module

2012-10-18 Thread Zhang Yanfei
Signed-off-by: zhangyanfei --- arch/x86/kvm/vmx.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4ff0ab9..f6a16b2 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -41,6 +41,7 @@ #include #include

[PATCH v5 0/2] x86: vmclear vmcss on all cpus when doing kdump if necessary

2012-11-20 Thread Zhang Yanfei
cpu_emergency_clear_loaded_vmcss as Marcelo suggested. Changelog from v1 to v2: 1. remove the sysctl and clear VMCSs unconditionally. Zhang Yanfei (2): x86/kexec: VMCLEAR vmcss on all cpus if necessary KVM-INTEL: add a notifier and a bitmap to support VMCLEAR in kdump arch/x86/include/asm/kexec.h |2 + arch/x86/kernel

[PATCH v5 1/2] x86/kexec: VMCLEAR vmcss on all cpus if necessary

2012-11-20 Thread Zhang Yanfei
This patch adds an atomic notifier list named crash_notifier_list. When loading kvm-intel module, a notifier will be registered in the list to enable vmcss loaded on all cpus to be VMCLEAR'd if needed. Signed-off-by: Zhang Yanfei --- arch/x86/include/asm/kexec.h |2 ++ arch/x86/kernel

[PATCH v5 2/2] KVM-INTEL: add a notifier and a bitmap to support VMCLEAR in kdump

2012-11-20 Thread Zhang Yanfei
The notifier will be registered in crash_notifier_list when loading kvm-intel module. And the bitmap indicates whether we should do VMCLEAR operation in kdump. The bits in the bitmap are set/unset according to different conditions. Signed-off-by: Zhang Yanfei --- arch/x86/kvm/vmx.c | 85

[PATCH v6 0/2] x86: vmclear vmcss on all cpus when doing kdump if necessary

2012-11-21 Thread Zhang Yanfei
ctl and clear VMCSs unconditionally. Zhang Yanfei (2): x86/kexec: VMCLEAR vmcss on all cpus if necessary KVM-INTEL: add a notifier and a bitmap to support VMCLEAR in kdump arch/x86/include/asm/kexec.h |2 + arch/x86/kernel/crash.c | 25 + arch/x86/kvm/vmx.c |

[PATCH v6 1/2] x86/kexec: VMCLEAR vmcss on all cpus if necessary

2012-11-21 Thread Zhang Yanfei
This patch adds an atomic notifier list named vmclear_notifier_list. When loading kvm-intel module, a notifier will be registered in the list to enable vmcss loaded on all cpus to be VMCLEAR'd if needed. Signed-off-by: Zhang Yanfei --- arch/x86/include/asm/kexec.h |2 ++ arch/x86/kernel

[PATCH v6 2/2] KVM-INTEL: add a notifier and a bitmap to support VMCLEAR in kdump

2012-11-21 Thread Zhang Yanfei
The notifier will be registered in vmclear_notifier_list when loading kvm-intel module. And the bitmap indicates whether we should do VMCLEAR operation in kdump. The bits in the bitmap are set/unset according to different conditions. Signed-off-by: Zhang Yanfei --- arch/x86/kvm/vmx.c | 77

Re: [PATCH 0/3] x86: clear vmcss on all cpus when doing kdump if necessary

2012-10-16 Thread Zhang Yanfei
于 2012年10月15日 23:43, Avi Kivity 写道: > On 10/12/2012 08:40 AM, Zhang Yanfei wrote: >> Currently, kdump just makes all the logical processors leave VMX operation by >> executing VMXOFF instruction, so any VMCSs active on the logical processors >> may >> be corrupt

Re: [PATCH 0/3] x86: clear vmcss on all cpus when doing kdump if necessary

2012-10-17 Thread Zhang Yanfei
于 2012年10月17日 18:16, Avi Kivity 写道: > On 10/17/2012 04:28 AM, Zhang Yanfei wrote: >> 于 2012年10月15日 23:43, Avi Kivity 写道: >>> On 10/12/2012 08:40 AM, Zhang Yanfei wrote: >>>> Currently, kdump just makes all the logical processors leave VMX operation >>>>

[PATCH v5 0/3] Export offsets of VMCS fields as note information for kdump

2012-07-12 Thread Zhang Yanfei
This patch set exports offsets of VMCS fields as note information for kdump. We call it VMCSINFO. The purpose of VMCSINFO is to retrieve runtime state of guest machine image, such as registers, in host machine's crash dump as VMCS format. The problem is that VMCS internal is hidden by Intel in its

[PATCH v5 1/3] KVM: Export symbols for module vmcsinfo-intel

2012-07-12 Thread Zhang Yanfei
A new module named vmcsinfo-intel is used to fill VMCSINFO. And this module depends on kvm-intel and kvm module. So we should export some symbols of kvm-intel and kvm module that are needed by vmcsinfo-intel. Signed-off-by: zhangyanfei --- arch/x86/include/asm/vmx.h | 73

[PATCH v5 2/3] KVM-INTEL: Add new module vmcsinfo-intel to fill VMCSINFO

2012-07-12 Thread Zhang Yanfei
fsets of VMCS fields for guest debugging. + * + * Copyright (C) 2012 Fujitsu, Inc. + * + * Authors: + * Zhang Yanfei + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * + */ + +#include +#include +#include +#include +#

[PATCH v5 3/3] Documentation: Add ABI entry for vmcs sysfs interface

2012-07-12 Thread Zhang Yanfei
: Zhang Yanfei +Description: + A collection of vmcs fields' offsets for Intel cpu. + Also including vmcs revision identifier. + + Individual offsets are contained in subfiles named by + the filed's encoding, e.g.: + + /sys/devices

Re: [PATCH v5 0/3] Export offsets of VMCS fields as note information for kdump

2012-07-29 Thread Zhang Yanfei
Hello Avi, Do you have any comments about this version of the patch set? 于 2012年07月12日 17:54, Zhang Yanfei 写道: > This patch set exports offsets of VMCS fields as note information for > kdump. We call it VMCSINFO. The purpose of VMCSINFO is to retrieve > runtime state of guest mach

<    2   3   4   5   6   7   8   >