Re: [PATCH v4 4/4] mm/vmalloc: don't assume vmap_area w/o VM_VM_AREA flag is vm_map_ram allocation

2013-09-03 Thread Zhang Yanfei
;va_end - va->va_start); > - return 0; > - } > - > v = va->vm; If we remove the if test above, in the window you said above, va->vm is NULL, but below we will still try to access the members of this vm_struct, which will cause problems... Correct m

[PATCH] mm/mmap.c: Remove unnecessary pgoff assignment

2013-09-05 Thread Zhang Yanfei
We never access variable pgoff later, so the assignment is redundant. Remove it. Signed-off-by: Zhang Yanfei --- mm/mmap.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index f9c97d1..db44f6a 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1570,7

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 wrote: > >> From: Zhang Yanfei >> >> 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 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 --- -v2: Replace the comment

Re: [PATCH v2 01/20] vmcore: refer to e_phoff member explicitly

2013-03-04 Thread Zhang Yanfei
n of program header table in > file-offset. Reviewed-by: Zhang Yanfei > > Signed-off-by: HATAYAMA Daisuke > --- > > fs/proc/vmcore.c | 40 > 1 files changed, 20 insertions(+), 20 deletions(-) > > diff --git a/fs/proc/vmco

Re: [PATCH v2 02/20] vmcore: rearrange program headers without assuming consequtive PT_NOTE entries

2013-03-05 Thread Zhang Yanfei
于 2013年03月02日 16:35, HATAYAMA Daisuke 写道: > Current code assumes all PT_NOTE headers are placed at the beginning > of program header table and they are consequtive. But the assumption > could be broken by future changes on either kexec-tools or the 1st > kernel. This patch removes the assumption

Re: [PATCH v2 03/20] vmcore, sysfs: export ELF note segment size instead of vmcoreinfo data size

2013-03-05 Thread Zhang Yanfei
7 +126,7 @@ static ssize_t vmcoreinfo_show(struct kobject *kobj, > { > return sprintf(buf, "%lx %x\n", > paddr_vmcoreinfo_note(), > -(unsigned int)vmcoreinfo_max_size); > +(unsigned int)

Re: [PATCH v2 02/20] vmcore: rearrange program headers without assuming consequtive PT_NOTE entries

2013-03-05 Thread Zhang Yanfei
于 2013年03月05日 17:02, HATAYAMA Daisuke 写道: > From: Zhang Yanfei > Subject: Re: [PATCH v2 02/20] vmcore: rearrange program headers without > assuming consequtive PT_NOTE entries > Date: Tue, 5 Mar 2013 16:36:53 +0800 > >> 于 2013年03月02日 16:35, HATAYAMA Daisuke 写道: >>

Re: [PATCH v2 04/20] vmcore: allocate buffer for ELF headers on page-size alignment

2013-03-05 Thread Zhang Yanfei
于 2013年03月02日 16:36, HATAYAMA Daisuke 写道: > Allocate buffer for ELF headers on page-size aligned boudary to > satisfy mmap() requirement. For this, __get_free_pages() is used > instead of kmalloc(). > > Also, later patch will decrease actually used buffer size for ELF > headers, so it's necessary

Re: [PATCH v2 15/20] kexec: fill note buffers by NT_VMCORE_PAD notes in page-size boundary

2013-03-07 Thread Zhang Yanfei
于 2013年03月02日 16:37, HATAYAMA Daisuke 写道: > Fill both crash_notes and vmcoreinfo_note buffers by NT_VMCORE_PAD > note type to make them satisfy mmap()'s page-size boundary > requirement. > > So far, end of note segments has been marked by zero-filled elf > header. Instead, this patch writes

Re: [PATCH v2 15/20] kexec: fill note buffers by NT_VMCORE_PAD notes in page-size boundary

2013-03-09 Thread Zhang Yanfei
于 2013年03月09日 11:46, HATAYAMA Daisuke 写道: > From: Yanfei Zhang > Subject: Re: [PATCH v2 15/20] kexec: fill note buffers by NT_VMCORE_PAD notes > in page-size boundary > Date: Fri, 8 Mar 2013 21:02:50 +0800 > >> 2013/3/8 HATAYAMA Daisuke : >>> From: Zhang Yanfei &g

Re: [PATCH v2 01/20] vmcore: refer to e_phoff member explicitly

2013-03-09 Thread Zhang Yanfei
于 2013年03月05日 15:35, Zhang Yanfei 写道: > 于 2013年03月02日 16:35, HATAYAMA Daisuke 写道: >> Code around /proc/vmcore currently assumes program header table is >> next to ELF header. But future change can break the assumption on >> kexec-tools and the 1st kernel. To avoid

Re: [PATCH v2 07/20] vmcore: copy non page-size aligned head and tail pages in 2nd kernel

2013-03-09 Thread Zhang Yanfei
于 2013年03月02日 16:36, HATAYAMA Daisuke 写道: > Due to mmap() requirement, we need to copy pages not starting or > ending with page-size aligned address in 2nd kernel and to map them to > user-space. > > For example, see the map below: > > -0001 : reserved > 0001-0009f7ff :

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

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

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 &

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 >> >> Memory reserved for crashkernel could be large. So we should not allocate >> this memory bottom up from the end of kernel image. &g

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"

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

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 >> >> The hot-Pluggable field in SRAT specifies which memory is hotpluggable. >> As we mentioned before, if hotpluggable memory is used by the

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 C

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

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 >> + * @m

[PATCH v2 -next] mm: Remove duplicated call of get_pfn_range_for_nid

2013-06-06 Thread Zhang Yanfei
From: Zhang Yanfei When calculating pages in a node, for each zone in that node, we will have zone_spanned_pages_in_node --> get_pfn_range_for_nid zone_absent_pages_in_node --> get_pfn_range_for_nid That is to say, we call the get_pfn_range_for_nid to get start_pfn and e

Re: [PATCH v8 9/9] vmcore: support mmap() on /proc/vmcore

2013-06-06 Thread Zhang Yanfei
On 06/04/2013 11:34 PM, Maxim Uvarov wrote: > > > > 2013/6/3 Atsushi Kumagai <mailto:kumagai-atsu...@mxc.nes.nec.co.jp>> > > Hello Maxim, > > On Thu, 30 May 2013 14:30:01 +0400 > Maxim Uvarov mailto:muva...@gmail.com>> wrote: > >

[PATCH 0/3] mm, vmalloc: cleanup for vmap block

2013-06-07 Thread Zhang Yanfei
improving the algorithm later on. Based on the two patches before, I split the cleanup into three small pieces that may be more clear. Zhang Yanfei (3): mm, vmalloc: Remove dead code in vb_alloc mm, vmalloc: Remove unused purge_fragmented_blocks_thiscpu mm, vmalloc: Remove alloc_map from

[PATCH 1/3] mm, vmalloc: Remove dead code in vb_alloc

2013-06-07 Thread Zhang Yanfei
is impossible to fail. Thus, the fragmented block purging was never invoked from vb_alloc(). So remove this dead code. Signed-off-by: Zhang Yanfei --- mm/vmalloc.c | 16 +--- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d365724..b8abcba

[PATCH 2/3] mm, vmalloc: Remove unused purge_fragmented_blocks_thiscpu

2013-06-07 Thread Zhang Yanfei
This function is nowhere used now, so remove it. Signed-off-by: Zhang Yanfei --- mm/vmalloc.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index b8abcba..5c037b9 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -891,11 +891,6 @@ static

[PATCH 3/3] mm, vmalloc: Remove alloc_map from vmap_block

2013-06-07 Thread Zhang Yanfei
As we have removed the dead code in the vb_alloc, it seems there is no place to use the alloc_map. So there is no reason to maintain the alloc_map in vmap_block. Signed-off-by: Zhang Yanfei --- mm/vmalloc.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/mm/vmalloc.c

Re: [patch -mm] mm, vmalloc: unbreak __vunmap()

2013-06-07 Thread Zhang Yanfei
On 06/07/2013 08:07 PM, Dan Carpenter wrote: > There is an extra semi-colon so the function always returns. Acked-by: Zhang Yanfei This is imported by using the macro PAGE_ALIGNED. > > Signed-off-by: Dan Carpenter > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 91a10

[PATCH -mm] mm, vmalloc: Prompt the failure message before return

2013-06-08 Thread Zhang Yanfei
From: Zhang Yanfei Use goto to jump to the fail label to give a failure message before returning NULL. This makes the failure handling in this function consistent. Signed-off-by: Zhang Yanfei --- mm/vmalloc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm

[PATCH -mm 1/2] mm, vmalloc: Rename VM_UNLIST to VM_UNINITIALIZED

2013-06-08 Thread Zhang Yanfei
From: Zhang Yanfei VM_UNLIST was used to indicate that the vm_struct is not listed in vmlist. But after commit 4341fa4: mm, vmalloc: remove list management of vmlist after initializing vmalloc , the meaning of this flag changed. It now means the vm_struct is not fully initialized. So renaming

[PATCH -mm 2/2] mm, vmalloc: Check VM_UNINITIALIZED flag in s_show instead of show_numa_info

2013-06-08 Thread Zhang Yanfei
From: Zhang Yanfei We should check the VM_UNITIALIZED flag in s_show(). If this flag is set, that said, the vm_struct is not fully initialized. So it is unnecessary to try to show the information contained in vm_struct. We checked this flag in show_numa_info(), but I think it's better to check

Re: [PATCH] vmcore: disable mmap_vmcore() if CONFIG_MMU is not defined

2013-06-10 Thread Zhang Yanfei
c int __init merge_note_headers_elf32(char > *elfptr, size_t *elfsz, > return rc; > > *notes_sz = roundup(phdr_sz, PAGE_SIZE); > - *notes_buf = vzalloc(*notes_sz); > + *notes_buf = alloc_elfnotes_buf(*notes_sz); > if (!*notes_buf) >

[PATCH] mm: Add unlikely for current_order test

2013-06-15 Thread Zhang Yanfei
From: Zhang Yanfei Since we have an unlikely for the "current_order >= pageblock_order / 2" test above, adding an unlikely for this "current_order >= pageblock_order" test seems more appropriate. Signed-off-by: Zhang Yanfei --- mm/page_alloc.c |2 +- 1 files c

Re: + mm-remove-duplicated-call-of-get_pfn_range_for_nid.patch added to -mm tree

2013-06-16 Thread Zhang Yanfei
uninitialized warnings in Arches with no CONFIG_HAVE_MEMBLOCK_NODE_MAP. ------ From: Zhang Yanfei Date: Mon, 17 Jun 2013 09:07:49 +0800 Subject: [PATCH] mm: Remove duplicated call of get_pfn_range_for_nid When calculating pages in a node, for eac

Re: [PATCH] mm: Add unlikely for current_order test

2013-06-16 Thread Zhang Yanfei
Hi David, On 06/17/2013 02:04 AM, David Rientjes wrote: > On Sat, 15 Jun 2013, Zhang Yanfei wrote: > >> From: Zhang Yanfei >> >> Since we have an unlikely for the "current_order >= pageblock_order / 2" >> test above, adding an unlikely for this "

Re: [PATCH] mm: Add unlikely for current_order test

2013-06-17 Thread Zhang Yanfei
On 06/18/2013 05:37 AM, David Rientjes wrote: > On Mon, 17 Jun 2013, Zhang Yanfei wrote: > >>> I don't understand the justification at all, current_order being unlikely >>> greater than or equal to pageblock_order / 2 doesn't imply at all that >>> it's unlik

[PATCH] mm: Remove unlikely from the current_order test

2013-06-17 Thread Zhang Yanfei
From: Zhang Yanfei In __rmqueue_fallback(), current_order loops down from MAX_ORDER - 1 to the order passed. MAX_ORDER is typically 11 and pageblock_order is typically 9 on x86. Integer division truncates, so pageblock_order / 2 is 4. For the first eight iterations, it's guaranteed

[PATCH] mm: Remove unused function __put_page

2013-06-18 Thread Zhang Yanfei
From: Zhang Yanfei This function is nowhere used, and it has a confusing name with put_page in mm/swap.c. So better to remove it. Signed-off-by: Zhang Yanfei --- mm/internal.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index

[PATCH] mm, sparse: Put clear_hwpoisoned_pages within CONFIG_MEMORY_HOTREMOVE

2013-06-18 Thread Zhang Yanfei
From: Zhang Yanfei With CONFIG_MEMORY_HOTREMOVE unset, there is a compile warning: mm/sparse.c:755: warning: ‘clear_hwpoisoned_pages’ defined but not used And Bisecting it ended up pointing to: commit 4edd7ceff0662afde195da6f6c43e7cbe1ed2dc4 Author: David Rientjes Date: Mon Apr 29 15:08:22

Re: [PATCH v4 6/6] mm/pgtable: Don't accumulate addr during pgd prepopulate pmd

2013-06-18 Thread Zhang Yanfei
e addr variable any more, this > patch remove it. > > Reviewed-by: Michal Hocko > Signed-off-by: Wanpeng Li Reviewed-by: Zhang Yanfei > --- > arch/x86/mm/pgtable.c |4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/mm/pgtable.c b/ar

Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390

2013-05-24 Thread Zhang Yanfei
Hello Eric, 于 2013年05月25日 06:44, Eric W. Biederman 写道: > Vivek Goyal writes: > >> On Fri, May 24, 2013 at 05:06:26PM +0200, Michael Holzheu wrote: >>> Hello Vivek, >>> >>> On Fri, 24 May 2013 10:36:44 -0400 >>> Vivek Goyal wrote: >>> >>> [snip] >>> Sorry, I don't understand the problem.

[PATCH 0/7] Remove unused /dev/oldmem interface

2013-05-24 Thread Zhang Yanfei
es (except x86. In x86, saved_max_pfn is used by detect_calgary()), the only user of this variable is the read_oldmem interface of /dev/oldmem, so also remove the setting for saved_max_pfn in those architectures. Zhang Yanfei (7): /dev/oldmem: Remove this interface Documentation/devices.txt: R

[PATCH 1/7] /dev/oldmem: Remove the interface

2013-05-24 Thread Zhang Yanfei
From: Zhang Yanfei /dev/oldmem provides the interface for us to access the "old memory" in the dump-capture kernel. Unfortunately, no one actually uses this interface. And this interface could actually cause some real problems if used on ia64 where the cached/uncached accesses are

[PATCH 2/7] Documentation/devices.txt: Remove /dev/oldmem description

2013-05-24 Thread Zhang Yanfei
From: Zhang Yanfei Signed-off-by: Zhang Yanfei Cc: Dave Jones --- Documentation/devices.txt |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 08f01e7..4f85739 100644 --- a/Documentation/devices.txt +++ b

[PATCH 3/7] Documentation/kdump/kdump.txt: Remove /dev/oldmem description

2013-05-24 Thread Zhang Yanfei
From: Zhang Yanfei Signed-off-by: Zhang Yanfei Cc: Vivek Goyal --- Documentation/kdump/kdump.txt | 31 ++- 1 files changed, 6 insertions(+), 25 deletions(-) diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt index 9c7fd98..bec123e 100644

[PATCH 4/7] mips: Remove savemaxmem parameter setup

2013-05-24 Thread Zhang Yanfei
From: Zhang Yanfei saved_max_pfn is used to know the amount of memory that the previous kernel used. And for powerpc, we set saved_max_pfn by passing the kernel commandline parameter "savemaxmem=". The only user of saved_max_pfn in mips is read_oldmem interface. Since we ha

[PATCH 5/7] powerpc: Remove savemaxmem parameter setup

2013-05-24 Thread Zhang Yanfei
From: Zhang Yanfei saved_max_pfn is used to know the amount of memory that the previous kernel used. And for powerpc, we set saved_max_pfn by passing the kernel commandline parameter "savemaxmem=". The only user of saved_max_pfn in powerpc is read_oldmem interface. Since we ha

[PATCH 6/7] ia64: Remove setting for saved_max_pfn

2013-05-24 Thread Zhang Yanfei
From: Zhang Yanfei The only user of saved_max_pfn in ia64 is read_oldmem interface but we have removed that interface, so saved_max_pfn is now unneeded in ia64, and we needn't set it anymore. Signed-off-by: Zhang Yanfei Cc: Matt Fleming Cc: Tony Luck Cc: Fenghua Yu --- arch/ia64/kernel

[PATCH 7/7] s390: Remove setting for saved_max_pfn

2013-05-24 Thread Zhang Yanfei
From: Zhang Yanfei The only user of saved_max_pfn in s390 is read_oldmem interface but we have removed that interface, so saved_max_pfn is now unneeded in s390, and we needn't set it anymore. Signed-off-by: Zhang Yanfei Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Michael Holzheu --- arch

Re: [PATCH 0/2] kdump/mmap: Fix mmap of /proc/vmcore for s390

2013-05-25 Thread Zhang Yanfei
于 2013年05月25日 11:01, Eric W. Biederman 写道: > Zhang Yanfei writes: > >> Hello Eric, >> >>> The function copy_oldmem_page also concerns me. I don't have a clue why >>> we duplicate that function on every architecutre in a slightly different >>&g

Re: [PATCH 2/7] Documentation/devices.txt: Remove /dev/oldmem description

2013-05-25 Thread Zhang Yanfei
于 2013年05月26日 07:20, Eric W. Biederman 写道: > Zhang Yanfei writes: > >> From: Zhang Yanfei > > Won't we want to keep this reservation around to so that this number > doesn't get reused, and cause people confusion when > upgrading/downgrading kernels? Ah, yes. I wil

[PATCH v2 0/7] Remove unused /dev/oldmem interface

2013-05-26 Thread Zhang Yanfei
the future. And mark it obsolete since /dev/oldmem will be removed from kernel. Zhang Yanfei (7): /dev/oldmem: Remove this interface Documentation/devices.txt: Mark /dev/oldmem obsolete Documentation/kdump/kdump.txt: Remove /dev/oldmem description mips: Remove savemaxmem parameter setup power

[PATCH v2 1/7] /dev/oldmem: Remove the interface

2013-05-26 Thread Zhang Yanfei
From: Zhang Yanfei /dev/oldmem provides the interface for us to access the "old memory" in the dump-capture kernel. Unfortunately, no one actually uses this interface. And this interface could actually cause some real problems if used on ia64 where the cached/uncached accesses are

[PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete

2013-05-26 Thread Zhang Yanfei
From: Zhang Yanfei Signed-off-by: Zhang Yanfei Cc: Dave Jones --- Documentation/devices.txt |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 08f01e7..c8e4002 100644 --- a/Documentation/devices.txt +++ b

[PATCH v2 3/7] Documentation/kdump/kdump.txt: Remove /dev/oldmem description

2013-05-26 Thread Zhang Yanfei
From: Zhang Yanfei Signed-off-by: Zhang Yanfei Acked-by: "Eric W. Biederman" Cc: Vivek Goyal --- Documentation/kdump/kdump.txt | 31 ++- 1 files changed, 6 insertions(+), 25 deletions(-) diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump

[PATCH v2 4/7] mips: Remove savemaxmem parameter setup

2013-05-26 Thread Zhang Yanfei
From: Zhang Yanfei saved_max_pfn is used to know the amount of memory that the previous kernel used. And for powerpc, we set saved_max_pfn by passing the kernel commandline parameter "savemaxmem=". The only user of saved_max_pfn in mips is read_oldmem interface. Since we ha

[PATCH v2 5/7] powerpc: Remove savemaxmem parameter setup

2013-05-26 Thread Zhang Yanfei
From: Zhang Yanfei saved_max_pfn is used to know the amount of memory that the previous kernel used. And for powerpc, we set saved_max_pfn by passing the kernel commandline parameter "savemaxmem=". The only user of saved_max_pfn in powerpc is read_oldmem interface. Since we ha

[PATCH v2 6/7] ia64: Remove setting for saved_max_pfn

2013-05-26 Thread Zhang Yanfei
From: Zhang Yanfei The only user of saved_max_pfn in ia64 is read_oldmem interface but we have removed that interface, so saved_max_pfn is now unneeded in ia64, and we needn't set it anymore. Signed-off-by: Zhang Yanfei Acked-by: "Eric W. Biederman" Cc: Matt Fleming Cc: Ton

[PATCH v2 7/7] s390: Remove setting for saved_max_pfn

2013-05-26 Thread Zhang Yanfei
From: Zhang Yanfei The only user of saved_max_pfn in s390 is read_oldmem interface but we have removed that interface, so saved_max_pfn is now unneeded in s390, and we needn't set it anymore. Signed-off-by: Zhang Yanfei Acked-by: "Eric W. Biederman" Cc: Martin Schwidefsky Cc: Heik

Re: [PATCH 2/7] Documentation/devices.txt: Remove /dev/oldmem description

2013-05-26 Thread Zhang Yanfei
于 2013年05月27日 09:27, HATAYAMA Daisuke 写道: > (2013/05/26 9:58), Zhang Yanfei wrote: >> 于 2013年05月26日 07:20, Eric W. Biederman 写道: >>> Zhang Yanfei writes: >>> >>>> From: Zhang Yanfei >>> >>> Won't we want to keep this reservation around

Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete

2013-05-26 Thread Zhang Yanfei
于 2013年05月27日 09:46, HATAYAMA Daisuke 写道: > (2013/05/26 15:36), Zhang Yanfei wrote: >> From: Zhang Yanfei >> >> Signed-off-by: Zhang Yanfei >> Cc: Dave Jones >> --- >> Documentation/devices.txt |3 +-- >> 1 files changed, 1 insertions(+), 2

Re: Who uses kexec preserve context logic

2013-05-27 Thread Zhang Yanfei
On 10/23/2012 02:55 AM, Vivek Goyal wrote: > Hi, > > I am just curious to know if somebody uses kexec preserve context path. I > have never used it personally and I don't know anybody who makes use of it. > > Is it an unused code and should it be ripped out? > Hi Vivek, Related commit is:

Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete

2013-05-28 Thread Zhang Yanfei
On 05/28/2013 02:17 PM, Rob Landley wrote: > On 05/26/2013 08:54:19 PM, Zhang Yanfei wrote: >> 于 2013年05月27日 09:46, HATAYAMA Daisuke 写道: >> > (2013/05/26 15:36), Zhang Yanfei wrote: >> >> From: Zhang Yanfei >> >> >> >

Re: [PATCH v2 2/7] Documentation/devices.txt: Mark /dev/oldmem obsolete

2013-05-29 Thread Zhang Yanfei
On 05/29/2013 06:29 AM, Eric W. Biederman wrote: > Zhang Yanfei writes: > >> From: Zhang Yanfei >> >> Signed-off-by: Zhang Yanfei >> Cc: Dave Jones >> --- >> Documentation/devices.txt |3 +-- >> 1 files changed, 1 insertions(+), 2 deletions

Re: [PATCH 2/7] Documentation/devices.txt: Remove /dev/oldmem description

2013-05-29 Thread Zhang Yanfei
On 05/30/2013 06:20 AM, Andrew Morton wrote: > On Mon, 27 May 2013 09:27:42 +0800 Zhang Yanfei > wrote: > snip >> >> I've sent the v2 version and actually did what you said. > > I can't find any v2 version of this patchset. > > I did this: > > ---

Re: [PATCH v8 9/9] vmcore: support mmap() on /proc/vmcore

2013-05-30 Thread Zhang Yanfei
is of 32-bit length on x86-32: > unsigned long. > > More reviewing and testing, please. > > > Do you have git pull for both kernel and userland changes? I would > like to do some more testing on my machines. > > Maxim. > > >

[PATCH 1/3] mm, vmalloc: Only call setup_vmalloc_vm only in __get_vm_area_node

2013-06-03 Thread Zhang Yanfei
From: Zhang Yanfei Now for insert_vmalloc_vm, it only calls the two functions: - setup_vmalloc_vm: fill vm_struct and vmap_area instances - clear_vm_unlist: clear VM_UNLIST bit in vm_struct->flags So in function __get_vm_area_node, if VM_UNLIST bit unset in flags, that is the else branch h

[PATCH 2/3] mm, vmalloc: Call setup_vmalloc_vm instead of insert_vmalloc_vm

2013-06-03 Thread Zhang Yanfei
From: Zhang Yanfei Here we pass flags with only VM_ALLOC bit set, it is unnecessary to call clear_vm_unlist to clear VM_UNLIST bit. So use setup_vmalloc_vm instead of insert_vmalloc_vm. Signed-off-by: Zhang Yanfei --- mm/vmalloc.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions

[PATCH 3/3] mm, vmalloc: Remove insert_vmalloc_vm

2013-06-03 Thread Zhang Yanfei
From: Zhang Yanfei Now this function is nowhere used, we can remove it directly. Signed-off-by: Zhang Yanfei --- mm/vmalloc.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index edbfad0..e0a786d 100644 --- a/mm/vmalloc.c +++ b/mm

[PATCH] mm, vmalloc: Use clamp to simplify code

2013-06-03 Thread Zhang Yanfei
From: Zhang Yanfei Signed-off-by: Zhang Yanfei --- mm/vmalloc.c | 12 ++-- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d365724..2d7eb81 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1337,16 +1337,8 @@ static struct vm_struct

mm: Remove duplicated call of get_pfn_range_for_nid

2013-05-20 Thread Zhang Yanfei
e node for MAX_NR_ZONES * 2 times. And this is totally unnecessary if we call the get_pfn_range_for_nid before zone_*_pages_in_node add two extra arguments node_start_pfn and node_end_pfn for zone_*_pages_in_node, then we can remove the get_pfn_range_in_node in zone_*_pages_in_node. Signed-off-by: Zhang Yanfei -

[PATCH] Documentation/kdump: Remove TODO in this document

2013-05-23 Thread Zhang Yanfei
We have already had the relocatable kernel, so just remove the TODO in the kdump document. Signed-off-by: Zhang Yanfei --- Documentation/kdump/kdump.txt |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt

Re: [PATCH] Documentation/kdump: Remove TODO in this document

2013-05-23 Thread Zhang Yanfei
Add cc'ing triv...@kernel.org 于 2013年05月24日 12:54, Rob Landley 写道: > On 05/23/2013 03:30:15 AM, Zhang Yanfei wrote: >> We have already had the relocatable kernel, so just remove >> the TODO in the kdump document. >> >> Signed-off-by: Zhang Yanfei > > Acked-by:

Re: [PATCH] kexec: prevent double free on image allocation failure

2013-02-21 Thread Zhang Yanfei
you think you could queue this up? I don't have a handy tree. I still found another malloc/free problem in this function. So I update the patch. - >From 1fb76a35e4109e1435f55048c20ea58622e7f87b Mon Sep 17 00:00:00 2001 From: Zhang Yanfei Date: Fri, 22 Feb 2013

Re: [PATCH] kexec: prevent double free on image allocation failure

2013-02-21 Thread Zhang Yanfei
于 2013年02月22日 11:41, Sasha Levin 写道: > On 02/21/2013 09:46 PM, Zhang Yanfei wrote: >> 于 2013年02月22日 09:55, Eric W. Biederman 写道: >>> Sasha Levin writes: >>> >>>> If kimage_normal_alloc() fails to initialize an allocated kimage, it will >>>&

[PATCH] kexec: fix memory leak in function kimage_normal_alloc

2013-02-21 Thread Zhang Yanfei
If kimage_normal_alloc() fails to alloc pages for image->swap_page, it should call kimage_free_page_list() to free allocated pages in image->control_pages list before it frees image. Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Sasha Levin Signed-off-by: Zhang Yanfei ---

[PATCH] kexec: avoid freeing NULL pointer in function kimage_crash_alloc

2013-02-21 Thread Zhang Yanfei
Though there is no error if we free a NULL pointer, I think we could avoid this behaviour. Change the code a little in kimage_crash_alloc() could avoid this kind of unnecessary free. Cc: "Eric W. Biederman" Cc: Andrew Morton Signed-off-by: Zhang Yanfei --- kernel/kexe

[PATCH] kexec: use min_t/max_t to avoid 'if (foo == bar)' thing

2013-02-23 Thread Zhang Yanfei
This is just a tweak: using min_t/max_t to avoid `if (foo = bar)' thing. Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Simon Horman Signed-off-by: Zhang Yanfei --- kernel/kexec.c | 20 +--- 1 files changed, 5 insertions(+), 15 deletions(-) diff --git a/kernel

Re: [PATCH] kexec: use min_t/max_t to avoid 'if (foo == bar)' thing

2013-02-24 Thread Zhang Yanfei
于 2013年02月24日 18:55, Simon Horman 写道: > On Sun, Feb 24, 2013 at 12:03:00PM +0800, Zhang Yanfei wrote: >> This is just a tweak: using min_t/max_t to avoid `if (foo = bar)' thing. > > - s/=/==/; s/[/]max_t// > > > But in any case the change is more than that. > I'd be

[PATCH v2] kexec: Use min_t to simplify logic

2013-02-24 Thread Zhang Yanfei
From: Zhang Yanfei This is just a tweak: using min_t to simplify logic of variable assignments. v2: - Rewrite patch description as Simon suggested. - Fix an inappropriate if test introduced by v1. Thanks Simon. Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Simon Horman Signed-off

Re: [PATCH v2] kexec: Use min_t to simplify logic

2013-02-25 Thread Zhang Yanfei
于 2013年02月26日 07:35, Andrew Morton 写道: > On Mon, 25 Feb 2013 09:36:51 +0900 > Simon Horman wrote: > >> On Sun, Feb 24, 2013 at 10:37:21PM +0800, Zhang Yanfei wrote: >>> From: Zhang Yanfei >>> >>> This is just a tweak: using min_t to simplify log

[PATCH v3 1/2] kexec: fix wrong types of some local variables

2013-02-25 Thread Zhang Yanfei
The types of the following local variables: - ubytes/mbytes in kimage_load_crash_segment()/kimage_load_normal_segment() - r in vmcoreinfo_append_str() are wrong, so fix them. Cc: "Eric W. Biederman" Cc: Andrew Morton Cc: Simon Horman Signed-off-by: Zhang Yanfei --- kernel/kexe

[PATCH v3 2/2] kexec: Use min_t to simplify logic

2013-02-25 Thread Zhang Yanfei
t; Cc: Andrew Morton Reviewed-by: Simon Horman Signed-off-by: Zhang Yanfei --- kernel/kexec.c | 24 1 files changed, 8 insertions(+), 16 deletions(-) diff --git a/kernel/kexec.c b/kernel/kexec.c index 3cbfcc7..b6b16f9 100644 --- a/kernel/kexec.c +++ b/kernel/kexe

Re: [PATCH v3 2/2] kexec: Use min_t to simplify logic

2013-02-26 Thread Zhang Yanfei
于 2013年02月26日 16:38, Joe Perches 写道: > On Tue, 2013-02-26 at 13:30 +0800, Zhang Yanfei wrote: >> This is just a tweak: using min_t to simplify logic of variable >> assignments. >> >> v3: >> - cast type of (PAGE_SIZE - (maddr & ~PAGE_MASK)) into size_t. >

Re: [PATCH v3 2/2] kexec: Use min_t to simplify logic

2013-02-26 Thread Zhang Yanfei
于 2013年02月26日 16:53, Andrew Morton 写道: > On Tue, 26 Feb 2013 16:49:02 +0800 Zhang Yanfei > wrote: > >>>> diff --git a/kernel/kexec.c b/kernel/kexec.c >>> [] >>>> @@ -822,13 +822,9 @@ static int kimage_load_normal_segment(struct kimage >>>>

Re: [PATCH v2, part1 29/29] mm,kexec: use common help functions to free reserved pages

2013-03-10 Thread Zhang Yanfei
于 2013年03月10日 14:27, Jiang Liu 写道: > Use common help functions to free reserved pages. > > Signed-off-by: Jiang Liu > Cc: Eric Biederman Reviewed-by: Zhang Yanfei > --- > kernel/kexec.c |8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > di

[PATCH 01/18] arm: remove cast for kzalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kzalloc return value. Signed-off-by: Zhang Yanfei Cc: Andrew Morton Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org --- arch/arm/kernel/topology.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel

[PATCH 02/18] ia64: remove cast for kmalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kmalloc return value. Signed-off-by: Zhang Yanfei Cc: Tony Luck Cc: Fenghua Yu Cc: Andrew Morton Cc: linux-i...@vger.kernel.org --- arch/ia64/kernel/mca_drv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64

[PATCH 03/18] powerpc: 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: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Andrew Morton Cc: linuxppc-...@lists.ozlabs.org --- arch/powerpc/kernel/nvram_64.c |3 +-- arch/powerpc/kvm/book3s_pr.c |2 +- 2 files changed, 2 insertions

[PATCH 04/18] x86: platform: mrst: remove cast for kmalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kmalloc return value. Signed-off-by: Zhang Yanfei Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Andrew Morton Cc: "x...@kernel.org" --- arch/x86/platform/mrst/mrst.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git

[PATCH 05/18] driver: staging: csr: 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: Andrew Morton Cc: de...@driverdev.osuosl.org --- drivers/staging/csr/drv.c |4 ++-- drivers/staging/csr/netdev.c |2 +- drivers/staging/csr/sdio_mmc.c

[PATCH 06/18] driver: gpu: drm: i915: remove cast for kzalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kzalloc return value. Signed-off-by: Zhang Yanfei Cc: Andrew Morton Cc: David Airlie Cc: dri-de...@lists.freedesktop.org --- drivers/gpu/drm/i915/intel_sdvo.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers

[PATCH 07/18] driver: hv: remove cast for kmalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kmalloc return value. Signed-off-by: Zhang Yanfei Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Andrew Morton Cc: de...@linuxdriverproject.org --- drivers/hv/hv.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hv/hv.c b/drive

[PATCH 08/18] driver: isdn: capi: 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 Cc: Karsten Keil Cc: net...@vger.kernel.org --- drivers/isdn/capi/capidrv.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c

[PATCH 09/18] driver: isdn: hisax: 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: Andrew Morton Cc: Karsten Keil Cc: net...@vger.kernel.org --- drivers/isdn/hisax/fsm.c|2 +- drivers/isdn/hisax/hfc_sx.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/isdn

[PATCH 10/18] driver: s390: block: remove cast for kzalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kzalloc return value. Signed-off-by: Zhang Yanfei Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Andrew Morton Cc: linux...@de.ibm.com --- drivers/s390/block/dasd_devmap.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/s390/block

[PATCH 11/18] driver: s390: net: remove cast for kzalloc return value

2013-03-11 Thread Zhang Yanfei
remove cast for kzalloc return value. Signed-off-by: Zhang Yanfei Cc: Ursula Braun Cc: Frank Blaschka Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Andrew Morton Cc: linux...@de.ibm.com Cc: linux-s...@vger.kernel.org --- drivers/s390/net/qeth_core_main.c |2 +- 1 files changed, 1

[PATCH 12/18] driver: scsi: 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: "James E.J. Bottomley" Cc: Andrew Morton Cc: linux-s...@vger.kernel.org --- drivers/scsi/hpsa.c |3 +-- drivers/scsi/lpfc/lpfc_init.c |2 +- 2 files changed, 2 insertions(+), 3 deletion

<    1   2   3   4   5   6   7   8   >