Re: [PATCH] android: lmk: add swap pte pmd in tasksize

2016-03-10 Thread yalin wang
> On Mar 11, 2016, at 15:23, Lu Bing wrote: > > From: l00215322 > > Many android devices have zram,so we should add "MM_SWAPENTS" in tasksize. > Refer oom_kill.c,we add pte&pmd also. > > Reviewed-by: Chen Feng > Reviewed-by: Fu Jun > Reviewed-by: Xu YiPing > Reviewed-by: Yu DongBin > Sign

[RFC] arm: change to use generic sign_extend32() function

2015-12-27 Thread yalin wang
change to use generic sign_extend32() to caaculate branch_displacement. Signed-off-by: yalin wang --- arch/arm/probes/decode-arm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/probes/decode-arm.c b/arch/arm/probes/decode-arm.c index f72c33a..ff794c0 100644

Re: [RFC] mm: change find_vma() function

2015-12-21 Thread yalin wang
> On Dec 15, 2015, at 19:53, Kirill A. Shutemov > wrote: > > On Tue, Dec 15, 2015 at 02:41:21PM +0800, yalin wang wrote: >>> On Dec 15, 2015, at 05:11, Kirill A. Shutemov wrote: >>> Anyway, I don't think it's possible to gain anything measurable

Re: [RFC] mm: change find_vma() function

2015-12-14 Thread yalin wang
> On Dec 15, 2015, at 05:11, Kirill A. Shutemov wrote: > > On Mon, Dec 14, 2015 at 06:55:09PM +0100, Oleg Nesterov wrote: >> On 12/14, Kirill A. Shutemov wrote: >>> >>> On Mon, Dec 14, 2015 at 07:02:25PM +0800, yalin wang wrote: >>>> change find

[RFC] mm: change find_vma() function

2015-12-14 Thread yalin wang
change find_vma() to break ealier when found the adderss is not in any vma, don't need loop to search all vma. Signed-off-by: yalin wang --- mm/mmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/mmap.c b/mm/mmap.c index b513f20..8294c9b 100644 --- a/mm/mmap.c +++ b/mm/m

Re: [PATCH v2] clear file privilege bits when mmap writing

2015-12-03 Thread yalin wang
> On Dec 2, 2015, at 16:03, Kees Cook wrote: > > Normally, when a user can modify a file that has setuid or setgid bits, > those bits are cleared when they are not the file owner or a member > of the group. This is enforced when using write and truncate but not > when writing to a shared mmap on

Re: [PATCH 1/2] mm, printk: introduce new format string for flags

2015-12-03 Thread yalin wang
>> Technically, I think the answer is yes, at least in C99 (and I suppose >> gcc would accept it in gnu89 mode as well). >> >> printk("%pg\n", &(struct flag_printer){.flags = my_flags, .names = >> vmaflags_names}); >> >> Not tested, and I still don't think it would be particularly readable >> e

Re: [PATCH 1/2] mm, printk: introduce new format string for flags

2015-12-03 Thread yalin wang
> On Dec 3, 2015, at 00:03, Rasmus Villemoes wrote: > > On Thu, Dec 03 2015, yalin wang wrote: > >>> On Dec 2, 2015, at 13:04, Vlastimil Babka wrote: >>> >>> On 12/02/2015 06:40 PM, yalin wang wrote: >>> >>> (please trim your reply

Re: [PATCH 1/2] mm, printk: introduce new format string for flags

2015-12-02 Thread yalin wang
> On Dec 2, 2015, at 13:04, Vlastimil Babka wrote: > > On 12/02/2015 06:40 PM, yalin wang wrote: > > (please trim your reply next time, no need to quote whole patch here) > >> i am thinking why not make %pg* to be more generic ? >> not restricted to only GFP /

Re: [PATCH 1/2] mm, printk: introduce new format string for flags

2015-12-02 Thread yalin wang
> On Nov 30, 2015, at 08:10, Vlastimil Babka wrote: > > In mm we use several kinds of flags bitfields that are sometimes printed for > debugging purposes, or exported to userspace via sysfs. To make them easier to > interpret independently on kernel version and config, we want to dump also the >

Re: [PATCH v2 5/5] printk/nmi: Increase the size of the temporary buffer

2015-11-30 Thread yalin wang
> On Nov 27, 2015, at 19:09, Petr Mladek wrote: > > Testing has shown that the backtrace sometimes does not fit > into the 4kB temporary buffer that is used in NMI context. > > The warnings are gone when I double the temporary buffer size. > > Note that this problem existed even in the x86-spe

Re: no-op delay loops

2015-11-27 Thread yalin wang
> On Nov 27, 2015, at 16:53, Rasmus Villemoes wrote: > > Hi, > > It seems that gcc happily compiles > > for (i = 0; i < 10; ++i) ; > > into simply > > i = 10; > > (which is then usually eliminated as a dead store). At least at -O2, and > when i is not declared volatile. So i

Re: [PATCH V2] scripts: fix the sys path for gdb scripts

2015-11-27 Thread yalin wang
> On Nov 27, 2015, at 15:04, Jan Kiszka wrote: > > On 2015-11-27 07:41, yalin wang wrote: >> we insert __file__'s real path into sys.path, >> so that no matter we import the vmlinux-gdb.py from $OUT floder or >> from source code folder, we can always find the li

[PATCH V2] scripts: fix the sys path for gdb scripts

2015-11-26 Thread yalin wang
we insert __file__'s real path into sys.path, so that no matter we import the vmlinux-gdb.py from $OUT floder or from source code folder, we can always find the linux/ lib folder, and we don't need create link to linux/*.py files, remove the related make file. Signed-off-by:

Re: [PATCH] scripts: fix the sys path for gdb scripts

2015-11-26 Thread yalin wang
> On Nov 25, 2015, at 15:38, Jan Kiszka wrote: > > On 2015-11-19 11:54, yalin wang wrote: >> The sys.path should be scripts/gdb, >> so that we can import linux lib correctly. >> >> Signed-off-by: yalin wang >> --- >> scripts/gdb/vmlinux-gdb.p

[PATCH] sched: change nr_uninterruptible to be signed

2015-11-26 Thread yalin wang
nr_uninterruptible will be negative during running, this happened when dequeue a TASK_UNINTERRUPTIBLE task from rq1 and then wake up the task and queue it to rq2, then rq2->nr_uninterruptible-- will reuslt in negative value sometimes. Signed-off-by: yalin wang --- kernel/sched/loadavg.c

Re: [PATCH v2 6/9] mm, debug: introduce dump_gfpflag_names() for symbolic printing of gfp_flags

2015-11-26 Thread yalin wang
> On Nov 25, 2015, at 18:28, Vlastimil Babka wrote: > > On 11/25/2015 09:16 AM, Joonsoo Kim wrote: >> On Tue, Nov 24, 2015 at 01:36:18PM +0100, Vlastimil Babka wrote: >>> --- a/include/trace/events/gfpflags.h >>> +++ b/include/trace/events/gfpflags.h >>> @@ -8,8 +8,8 @@ >>> * >>> * Thus most b

[RFC] block: change blk_check_merge_flags() implementation

2015-11-20 Thread yalin wang
Use XOR to chenk some flags in flags1 and flags2 if the same, much faster on some platforms. Signed-off-by: yalin wang --- include/linux/blkdev.h | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c401ecd

Re: [PATCH v3] arm64: Add support for PTE contiguous bit.

2015-11-20 Thread yalin wang
> On Nov 20, 2015, at 00:57, David Woods wrote: > > The arm64 MMU supports a Contiguous bit which is a hint that the TTE > is one of a set of contiguous entries which can be cached in a single > TLB entry. Supporting this bit adds new intermediate huge page sizes. > > The set of huge page size

[PATCH] scripts: fix the sys path for gdb scripts

2015-11-19 Thread yalin wang
The sys.path should be scripts/gdb, so that we can import linux lib correctly. Signed-off-by: yalin wang --- scripts/gdb/vmlinux-gdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/vmlinux-gdb.py b/scripts/gdb/vmlinux-gdb.py index ce82bf5..5a45d1a 100644 --- a

Re: kernel oops on mmotm-2015-10-15-15-20

2015-11-19 Thread yalin wang
> On Nov 19, 2015, at 14:58, Kirill A. Shutemov wrote: > > uncharged i also encounter this crash , also i encounter a crash like this in qemu: [2.703436] [] do_execveat_common.isra.36+0x4f0/0x630 [2.703624] [] do_execve+0x24/0x30 [2.703767] [] SyS_execve+0x1c/0x2c [2.703923]

Re: [PATCH v2 2/3] lib: Introduce 2 bit ops api: all_is_bit_{one,zero}

2015-11-19 Thread yalin wang
> On Nov 19, 2015, at 14:48, Jia He wrote: > > why not use memcmp() to compare with 0x000 or 0x ? memcmp() have better performance on some platforms . Thanks -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.ker

Re: read physical address space

2015-11-17 Thread yalin wang
you should access it like this: printk ( *(int*)kmap(pays_to_page(pays_addr))); pays address must be mapped into virtual address before access it . > On Nov 17, 2015, at 23:21, alan hopes wrote: > > phys_addr -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [RFC] block: change to use atomic_inc_return_release()

2015-11-16 Thread yalin wang
> On Nov 17, 2015, at 11:38, Jens Axboe wrote: > > On 11/16/2015 08:24 PM, yalin wang wrote: >> Some arch define this atomic_inc_return_release() OP. > > That is a very vague commit message, you'll need a whole lot more than > that... A commit message is suppos

Re: [PATCH V4] mm: fix kernel crash in khugepaged thread

2015-11-16 Thread yalin wang
> On Nov 17, 2015, at 10:43, Steven Rostedt wrote: > > On Tue, 17 Nov 2015 10:21:47 +0800 > yalin wang wrote: > > >> i have not tried , >> just a question, >> if you print a %s , but don’t call trace_define_field() do define this >> string in >

[RFC] block: change to use atomic_inc_return_release()

2015-11-16 Thread yalin wang
Some arch define this atomic_inc_return_release() OP. Signed-off-by: yalin wang --- block/bio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/bio.c b/block/bio.c index fbc558b..b251857 100644 --- a/block/bio.c +++ b/block/bio.c @@ -310,8 +310,7 @@ static void

Re: [PATCH V4] mm: fix kernel crash in khugepaged thread

2015-11-16 Thread yalin wang
> On Nov 16, 2015, at 22:25, Steven Rostedt wrote: > > On Mon, 16 Nov 2015 11:16:22 +0100 > Vlastimil Babka wrote: >> -- Steve >>> it is not easy to print for perf tools in userspace , >>> if you use this format , >>> for user space perf tool, it print the entry by look up the member in

Re: [PATCH v3 01/17] mm: support madvise(MADV_FREE)

2015-11-15 Thread yalin wang
> On Nov 16, 2015, at 10:13, Minchan Kim wrote: > > On Fri, Nov 13, 2015 at 11:46:07AM -0800, Andy Lutomirski wrote: >> On Fri, Nov 13, 2015 at 12:13 AM, Daniel Micay wrote: >>> On 13/11/15 02:03 AM, Minchan Kim wrote: On Fri, Nov 13, 2015 at 01:45:52AM -0500, Daniel Micay wrote: >> An

[PATCH V2] mm: change mm_vmscan_lru_shrink_inactive() proto types

2015-11-15 Thread yalin wang
Move node_id zone_idx shrink flags into trace function, so thay we don't need caculate these args if the trace is disabled, and will make this function have less arguments. Signed-off-by: yalin wang --- include/trace/events/vmscan.h | 14 +++--- mm/vmscan.c

Re: [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types

2015-11-15 Thread yalin wang
> On Nov 13, 2015, at 21:16, Vlastimil Babka wrote: > > zone_to_nid make sense, i will send V2 patch , -- 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.ht

Re: [PATCH] mm: change may_enter_fs check condition

2015-11-15 Thread yalin wang
> On Nov 13, 2015, at 23:36, Michal Hocko wrote: > > On Fri 13-11-15 13:01:16, Vlastimil Babka wrote: >> On 11/13/2015 12:47 PM, yalin wang wrote: >>> Add page_is_file_cache() for __GFP_FS check, >>> otherwise, a Pageswapcache() && PageDirty() page can

Re: [PATCH V4] mm: fix kernel crash in khugepaged thread

2015-11-15 Thread yalin wang
> On Nov 13, 2015, at 22:01, Steven Rostedt wrote: > > On Fri, 13 Nov 2015 19:54:11 +0800 > yalin wang wrote: > >>>>> TP_fast_assign( >>>>> __entry->mm = mm; >>>>> - __entry->pfn = pfn; >>>>>

[PATCH V6] mm: fix kernel crash in khugepaged thread

2015-11-13 Thread yalin wang
: 0 Comm: swapper/2 Tainted: G D W 4.3.0-rc6-next-20151022ajb-1-g32f3386-dirty #3 [ 182.665248 ] Hardware name: linux,dummy-virt (DT) Signed-off-by: yalin wang --- include/trace/events/huge_memory.h | 12 ++-- mm/huge_memory.c | 6 +++--- 2 files changed

[PATCH V5] mm: fix kernel crash in khugepaged thread

2015-11-13 Thread yalin wang
: 0 Comm: swapper/2 Tainted: G D W 4.3.0-rc6-next-20151022ajb-1-g32f3386-dirty #3 [ 182.665248 ] Hardware name: linux,dummy-virt (DT) add the trace point with TP_CONDITION(page), avoid trace NULL page. Signed-off-by: yalin wang --- include/trace/events/huge_memory.h | 12

Re: [PATCH V4] mm: fix kernel crash in khugepaged thread

2015-11-13 Thread yalin wang
> On Nov 13, 2015, at 18:47, Vlastimil Babka wrote: > > On 11/12/2015 03:29 PM, Steven Rostedt wrote: >> On Thu, 12 Nov 2015 16:21:02 +0800 >> yalin wang wrote: >> >>> This crash is caused by NULL pointer deference, in page_to_pfn() marco, >>&g

[PATCH] mm: change may_enter_fs check condition

2015-11-13 Thread yalin wang
Add page_is_file_cache() for __GFP_FS check, otherwise, a Pageswapcache() && PageDirty() page can always be write back if the gfp flag is __GFP_FS, this is not the expected behavior. Signed-off-by: yalin wang --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [PATCH V4] mm: fix kernel crash in khugepaged thread

2015-11-13 Thread yalin wang
> On Nov 13, 2015, at 16:41, Hillf Danton wrote: > >> >> Instead of the condition, we could have: >> >> __entry->pfn = page ? page_to_pfn(page) : -1; >> >> >> But if there's no reason to do the tracepoint if page is NULL, then >> this patch is fine. I'm just throwing out this idea. >>

[PATCH V2] mmc: change to use kmalloc

2015-11-12 Thread yalin wang
Use kmalloc instead of kzalloc, zero the memory is not needed. Signed-off-by: yalin wang --- drivers/mmc/card/block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index c742cfd..c3fd4c8 100644 --- a/drivers/mmc/card

Re: [PATCH] mmc: change to use kmalloc

2015-11-12 Thread yalin wang
> On Nov 12, 2015, at 05:57, Andy Shevchenko wrote: > > On Wed, Nov 11, 2015 at 11:17 PM, Peter Hurley > wrote: >> On 11/11/2015 12:02 PM, Alim Akhtar wrote: >>> Hi Yalin, >>> >>> On Wed, Nov 11, 2015 at 9:53 AM, yalin wang >>> wrote: &

[PATCH V4] mm: fix kernel crash in khugepaged thread

2015-11-12 Thread yalin wang
: 0 Comm: swapper/2 Tainted: G D W 4.3.0-rc6-next-20151022ajb-1-g32f3386-dirty #3 [ 182.665248 ] Hardware name: linux,dummy-virt (DT) add the trace point with TP_CONDITION(page), avoid trace NULL page. Signed-off-by: yalin wang --- include/trace/events/huge_memory.h | 20

[PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types

2015-11-11 Thread yalin wang
Move node_id zone_idx shrink flags into trace function, so thay we don't need caculate these args if the trace is disabled, and will make this function have less arguments. Signed-off-by: yalin wang --- include/trace/events/vmscan.h | 14 +++--- mm/vmscan.c

[PATCH] mm: change trace_mm_vmscan_writepage() proto type

2015-11-11 Thread yalin wang
Move trace_reclaim_flags() into trace function, so that we don't need caculate these flags if the trace is disabled. Signed-off-by: yalin wang --- include/trace/events/vmscan.h | 7 +++ mm/vmscan.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --

Re: [PATCH V2] mm: fix kernel crash in khugepaged thread

2015-11-11 Thread yalin wang
Ok i will send a V3 patch. > On Nov 5, 2015, at 16:50, Kirill A. Shutemov wrote: > > On Thu, Nov 05, 2015 at 09:12:34AM +0100, Vlastimil Babka wrote: >> On 10/29/2015 01:35 AM, Kirill A. Shutemov wrote: @@ -2605,9 +2603,9 @@ out_unmap: /* collapse_huge_page will return with t

[PATCH V3] mm: fix kernel crash in khugepaged thread

2015-11-11 Thread yalin wang
: 0 Comm: swapper/2 Tainted: G D W 4.3.0-rc6-next-20151022ajb-1-g32f3386-dirty #3 [ 182.665248 ] Hardware name: linux,dummy-virt (DT) add the trace point with TP_CONDITION(page), avoid trace NULL page. Signed-off-by: yalin wang --- include/trace/events/huge_memory.h | 10

[PATCH] mmc: change to use kmalloc

2015-11-10 Thread yalin wang
Use kmalloc instead of kzalloc, zero the memory is not needed. Signed-off-by: yalin wang --- drivers/mmc/card/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 23b6c8e..975cd3e 100644 --- a/drivers/mmc/card

Re: [V3 PATCH] arm64: remove redundant FRAME_POINTER kconfig option and force to select it

2015-11-10 Thread yalin wang
> On Nov 10, 2015, at 19:35, Catalin Marinas wrote: > > On Tue, Nov 10, 2015 at 07:09:00PM +0800, yalin wang wrote: >>> On Nov 10, 2015, at 18:37, Catalin Marinas wrote: >>> >>> On Mon, Nov 09, 2015 at 10:09:55AM -0800, Yang Shi wrote: >>>> FR

Re: [PATCH] arm64: add HAVE_LATENCYTOP_SUPPORT config

2015-11-10 Thread yalin wang
> On Nov 10, 2015, at 19:18, Will Deacon wrote: > > Ha, so it does! Patch below. The only non-trivial part was arch/arm/, > which has a dependency on !SMP which I believe is no longer required > as of d5996b2ff0e2 ("ARM: fix /proc/$PID/stack on SMP"). > > Will > > --->8 > > From 8dfb40e92ac32

Re: [V3 PATCH] arm64: remove redundant FRAME_POINTER kconfig option and force to select it

2015-11-10 Thread yalin wang
> On Nov 10, 2015, at 18:37, Catalin Marinas wrote: > > On Mon, Nov 09, 2015 at 10:09:55AM -0800, Yang Shi wrote: >> FRAME_POINTER is defined in lib/Kconfig.debug, it is unnecessary to redefine >> it in arch/arm64/Kconfig.debug. Actually, the one defined in arm64 directory >> is never used. >

Re: [PATCH] arm64: add HAVE_LATENCYTOP_SUPPORT config

2015-11-06 Thread yalin wang
i just enable it on ARM64, and it can work, i don’t see some special requirement to enable this config . > On Nov 7, 2015, at 00:05, Will Deacon wrote: > > On Fri, Nov 06, 2015 at 11:57:58PM +0800, yalin wang wrote: >> Add HAVE_LATENCYTOP_SUPPORT in Kconfig, so that >> we ca

[PATCH] arm64: add HAVE_LATENCYTOP_SUPPORT config

2015-11-06 Thread yalin wang
Add HAVE_LATENCYTOP_SUPPORT in Kconfig, so that we can enable this feature on ARM64 Signed-off-by: yalin wang --- arch/arm64/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 851fe11..782b5bd 100644 --- a/arch/arm64/Kconfig +++ b/arch

[PATCH] goldfish: fix goldfish_pipe driver BUG

2015-11-06 Thread yalin wang
param() function, seems not used, we don't need use this function in goldfish_pipe_read_write(). Signed-off-by: yalin wang --- drivers/platform/goldfish/goldfish_pipe.c | 56 +++ 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/drivers/platfor

[PATCH V2] goldfish: add goldfish match node for dt driver probe

2015-11-05 Thread yalin wang
qemu use device tree to bootup linux kernel, we need add device node match table to plaftorm driver, so that can probe the goldfish driver correctly. test by this qemu: git clone https://android.googlesource.com/platform/external/qemu Signed-off-by: yalin wang --- drivers/input/keyboard

[PATCH] goldfish: add goldfish match node for dt driver probe

2015-11-05 Thread yalin wang
Signed-off-by: yalin wang --- drivers/input/keyboard/goldfish_events.c | 9 + drivers/platform/goldfish/goldfish_pipe.c | 11 ++- drivers/power/goldfish_battery.c | 11 ++- drivers/staging/goldfish/goldfish_audio.c | 11 ++- drivers/staging/goldfish

[PATCH] kconfig: fix missing symbol error

2015-11-05 Thread yalin wang
Add GOLDFISH OLPC config symbols, which is missing. Signed-off-by: yalin wang --- drivers/platform/Kconfig | 8 1 file changed, 8 insertions(+) diff --git a/drivers/platform/Kconfig b/drivers/platform/Kconfig index 0adccbf..81f4fb3 100644 --- a/drivers/platform/Kconfig +++ b/drivers

Re: [PATCH] mm: change tlb_finish_mmu() to be more simple

2015-11-04 Thread yalin wang
> On Nov 4, 2015, at 16:36, Sergey Senozhatsky > wrote: > > On (11/04/15 15:35), yalin wang wrote: > [..] >> >> -for (batch = tlb->local.next; batch; batch = next) { >> -next = batch->next; >> +for (batch

Re: [PATCH v4 6/6] arm64: ftrace: add arch-specific stack tracer

2015-11-04 Thread yalin wang
> On Oct 30, 2015, at 13:25, AKASHI Takahiro wrote: > > Stack tracer on arm64, check_stack(), is uniqeue in the following > points: > * analyze a function prologue of a traced function to estimate a more > accurate stack pointer value, replacing naive ' + 0x10.' > * use walk_stackframe(), inste

[RFC] ext4: remove unused page_idx

2015-11-04 Thread yalin wang
Signed-off-by: yalin wang --- fs/ext4/readpage.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ignore my previous patch diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c index 5dc5e95..2cc2760 100644 --- a/fs/ext4/readpage.c +++ b/fs/ext4/readpage.c @@ -135,7 +135,6 @@ int

[RFC] ext4: fix a BUG in ext4_mpage_readpages()

2015-11-03 Thread yalin wang
The last block should be the total read pages last block, need adjust the block number when caculate every page. Signed-off-by: yalin wang --- fs/ext4/readpage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c index 5dc5e95..d20c39d

[PATCH] mm: change tlb_finish_mmu() to be more simple

2015-11-03 Thread yalin wang
This patch remove unneeded *next temp variable, make this function more simple to read. Signed-off-by: yalin wang --- mm/memory.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 7f3b9f2..f0040ed 100644 --- a/mm/memory.c +++ b/mm

Re: [PATCH 1/3] power, vfs: move away from PF_KTHREAD freezing in favor of fs freezing

2015-11-01 Thread yalin wang
> On Oct 30, 2015, at 21:47, Jiri Kosina wrote: > > From: Jiri Kosina > > Freeze all filesystems during hibernation in favor of dropping kthread > freezing completely. > > Kthread freezing has a history of not very well defined semantics. > Historically, it has been established to make sure t

Re: [PATCH 4/5] mm: simplify reclaim path for MADV_FREE

2015-10-27 Thread yalin wang
> On Oct 27, 2015, at 16:52, yalin wang wrote: > > >> On Oct 27, 2015, at 16:10, Minchan Kim wrote: >> >> On Tue, Oct 27, 2015 at 03:39:16PM +0800, yalin wang wrote: >>> >>>> On Oct 27, 2015, at 15:09, Minchan Kim wrote: >>>> &

Re: [PATCH 4/5] mm: simplify reclaim path for MADV_FREE

2015-10-27 Thread yalin wang
> On Oct 27, 2015, at 16:10, Minchan Kim wrote: > > On Tue, Oct 27, 2015 at 03:39:16PM +0800, yalin wang wrote: >> >>> On Oct 27, 2015, at 15:09, Minchan Kim wrote: >>> >>> Hello Yalin, >>> >>> Sorry for missing you in Cc list

Re: [PATCH 4/5] mm: simplify reclaim path for MADV_FREE

2015-10-27 Thread yalin wang
> On Oct 27, 2015, at 15:09, Minchan Kim wrote: > > Hello Yalin, > > Sorry for missing you in Cc list. > IIRC, mails to send your previous mail address(yalin.w...@sonymobile.com) > were returned. > > You added comment bottom line so I'm not sure what PageDirty you meant. > >> it is wrong here

Re: [PATCH 4/5] mm: simplify reclaim path for MADV_FREE

2015-10-26 Thread yalin wang
> On Oct 27, 2015, at 10:09, Hugh Dickins wrote: > > On Mon, 19 Oct 2015, Minchan Kim wrote: > >> I made reclaim path mess to check and free MADV_FREEed page. >> This patch simplify it with tweaking add_to_swap. >> >> So far, we mark page as PG_dirty when we add the page into >> swap cache(ie,

[PATCH V2] mm: fix kernel crash in khugepaged thread

2015-10-26 Thread yalin wang
: 0 Comm: swapper/2 Tainted: G D W 4.3.0-rc6-next-20151022ajb-1-g32f3386-dirty #3 [ 182.665248 ] Hardware name: linux,dummy-virt (DT) Signed-off-by: yalin wang --- mm/huge_memory.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/mm/huge_memory.c

Re: [PATCH] mm: fix kernel crash in khugepaged thread

2015-10-23 Thread yalin wang
> On Oct 23, 2015, at 18:11, Kirill A. Shutemov wrote: > > On Fri, Oct 23, 2015 at 05:38:49PM +0800, yalin wang wrote: >> This crash is caused by NULL pointer deference: >> [ 182.639154 ] Unable to handle kernel NULL pointer dereference at virtual >> address

[PATCH] mm: fix kernel crash in khugepaged thread

2015-10-23 Thread yalin wang
4.3.0-rc6-next-20151022ajb-1-g32f3386-dirty #3 [ 182.665248 ] Hardware name: linux,dummy-virt (DT) Signed-off-by: yalin wang --- mm/huge_memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 4b3420a..a5f4d9c 100644 --- a

[RFC] bpf: change bpf syacall to use u64 temp variables

2015-10-19 Thread yalin wang
This patch change map_lookup_elem() and map_update_elem() function to use u64 temp variable if the key_size or value_size is less than u64, we don't need use kmalloc() for these small variables. Signed-off-by: yalin wang --- kernel/bpf/syscall.c | 30 -- 1

Re: [PATCH] arm64: change to use memmove in efi-stub

2015-10-18 Thread yalin wang
Got it , Thanks for your explanation . > On Oct 16, 2015, at 18:57, Mark Rutland wrote: > > Hi, > > On Fri, Oct 16, 2015 at 06:46:07PM +0800, yalin wang wrote: >> Change to use memmove(), in case the dest address overlap with the >> source address. > > This ca

[PATCH] arm64: change to use memmove in efi-stub

2015-10-16 Thread yalin wang
Change to use memmove(), in case the dest address overlap with the source address. Signed-off-by: yalin wang --- arch/arm64/kernel/efi-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c index 816120e..b6dc44b

Re: [RFC] arm64: ioremap: add ioremap_cache macro

2015-10-14 Thread yalin wang
> On Oct 14, 2015, at 16:23, Arnd Bergmann wrote: > > On Wednesday 14 October 2015 10:41:26 yalin wang wrote: > >>> On Oct 13, 2015, at 23:20, Catalin Marinas wrote: >>>> I'm not sure we want this. See: >>>> >>>> https://lkml.

Re: [RFC] arm64: ioremap: add ioremap_cache macro

2015-10-13 Thread yalin wang
> On Oct 13, 2015, at 23:20, Catalin Marinas wrote: > > On Tue, Oct 13, 2015 at 03:23:27PM +0100, Will Deacon wrote: >> On Tue, Oct 13, 2015 at 03:10:55PM +0100, Catalin Marinas wrote: >>> On Mon, Oct 12, 2015 at 10:28:18AM +0800, yalin wang wrote: >>>> A

Re: [RFC] arm: add __initbss section attribute

2015-10-13 Thread yalin wang
> On Oct 13, 2015, at 17:40, Arnd Bergmann wrote: > > On Tuesday 13 October 2015 15:33:10 yalin wang wrote: >> >>> On Oct 13, 2015, at 04:04, Sam Ravnborg wrote: >>> >>>> --- a/include/asm-generic/vmlinux.lds.h >>>> +++ b/include/

Re: [RFC] arm: add __initbss section attribute

2015-10-13 Thread yalin wang
> On Oct 13, 2015, at 04:04, Sam Ravnborg wrote: > >> --- a/include/asm-generic/vmlinux.lds.h >> +++ b/include/asm-generic/vmlinux.lds.h >> >> -#define BSS_SECTION(sbss_align, bss_align, stop_align) >> \ >> +#define BSS_SECTION(sbss_align, bss_align, initbss_align, stop_al

Re: [RFC] mm: fix a BUG, the page is allocated 2 times

2015-10-12 Thread yalin wang
void a memory leak. > > This is a fix to the mmotm patch > mm-page_alloc-reserve-pageblocks-for-high-order-atomic-allocations-on-demand.patch > > Signed-off-by: yalin wang > Acked-by: Mel Gorman no problem, i have send the patch again using your change log . Thanks-- To unsub

[PATCH V2] mm, page_alloc: reserve pageblocks for high-order atomic allocations on demand -fix

2015-10-12 Thread yalin wang
-pageblocks-for-high-order-atomic-allocations-on-demand.patch Signed-off-by: yalin wang Acked-by: Mel Gorman --- mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 0d6f540..043b691 100644 --- a/mm/page_alloc.c +++ b/mm

Re: [RFC] arm: add __initbss section attribute

2015-10-12 Thread yalin wang
> On Oct 12, 2015, at 16:22, Ard Biesheuvel wrote: > > On 12 October 2015 at 05:59, yalin wang wrote: >> This attribute can make init data to be into .initbss section, >> this will make the data to be NO_BITS in vmlinux, can shrink the >> Image file size, an

[RFC] fixmap: change temp variable name

2015-10-12 Thread yalin wang
Change temp variable name addr to addr, so that not conflict with the caller's variable name, it will build error if call like this: __set_fixmap_offset(idx, addr, flags) Signed-off-by: yalin wang --- include/asm-generic/fixmap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 dele

Re: [RFC] mm: fix a BUG, the page is allocated 2 times

2015-10-12 Thread yalin wang
> On Oct 12, 2015, at 15:38, Vlastimil Babka wrote: > > On 10/12/2015 04:40 AM, yalin wang wrote: >> Remove unlikely(order), because we are sure order is not zero if >> code reach here, also add if (page == NULL), only allocate page again if >> __rmqueue_small

[RFC] arm64: add kc_offset_to_vaddr and kc_vaddr_to_offset macro

2015-10-11 Thread yalin wang
This patch add kc_offset_to_vaddr() and kc_vaddr_to_offset(), the default version doesn't work on arm64, because arm64 kernel address is below the PAGE_OFFSET, like module address and vmemmap address are all below PAGE_OFFSET address. Signed-off-by: yalin wang --- arch/arm64/includ

Re: [PATCH] ARM:mm: fix kmap_atomic_to_page

2015-10-11 Thread yalin wang
> On Oct 6, 2015, at 19:09, Chanho Min wrote: > > Since kmap_atomic returns the pkmap address without a new mapping to > fixmap for the page that is already mapped by kmap, It should be > considered for the pkmap address in kmap_atomic_to_page. > > Signed-off-by: Chanho Min > --- > arch/arm/mm

[RFC] arm: add __initbss section attribute

2015-10-11 Thread yalin wang
This attribute can make init data to be into .initbss section, this will make the data to be NO_BITS in vmlinux, can shrink the Image file size, and speed up the boot up time. Signed-off-by: yalin wang --- arch/arm/kernel/vmlinux.lds.S | 2 +- arch/arm/mm/init.c| 1

[RFC] mm: fix a BUG, the page is allocated 2 times

2015-10-11 Thread yalin wang
Remove unlikely(order), because we are sure order is not zero if code reach here, also add if (page == NULL), only allocate page again if __rmqueue_smallest() failed or alloc_flags & ALLOC_HARDER == 0 Signed-off-by: yalin wang --- mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+

[RFC] arm64: ioremap: add ioremap_cache macro

2015-10-11 Thread yalin wang
Add ioremap_cache macro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example, memremap.c do like this. Signed-off-by: yalin wang --- arch/arm64/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

Re: [Linux] Linux PID algorithm is BRAINDEAD!

2015-10-09 Thread yalin wang
> On Oct 10, 2015, at 10:00, Dave Goel wrote: > > Pardon the subject line! I think the PID algo. is actually pretty > good and cheap. > > > I just think that a very minor tweak could actually make it *actually* do > what it always intended to do (that is, satisfy the PID-AIM listed below)! >

Re: [RFC] arm: add relocate initrd support

2015-10-09 Thread yalin wang
> On Oct 10, 2015, at 00:10, Russell King - ARM Linux > wrote: > > On Fri, Oct 09, 2015 at 11:55:09PM +0800, yalin wang wrote: >> Add support for initrd on ARM arch, in case >> mem= boot option change the memory size or the initrd are >> not placed in low memory r

[RFC V2] arm: add relocate initrd support

2015-10-09 Thread yalin wang
Add support for initrd on ARM arch, in case mem= boot option change the memory size or the initrd are not placed in low memory region, we need copy the initrd to low memory region. Signed-off-by: yalin wang --- arch/arm/include/asm/fixmap.h | 1 + arch/arm/kernel/setup.c | 70

Re: [RFC V3] regmap: change bool to 1 bit variable in struct regmap

2015-10-09 Thread yalin wang
hi i have sync this branch, but see my patch have been merged :) seems correct. Thanks > On Oct 9, 2015, at 19:35, Mark Brown wrote: > > On Fri, Oct 09, 2015 at 03:51:22PM +0800, yalin wang wrote: >> This patch change some bool variables in struct regmap { } >> to be u

[RFC] arm: add relocate initrd support

2015-10-09 Thread yalin wang
Add support for initrd on ARM arch, in case mem= boot option change the memory size or the initrd are not placed in low memory region, we need copy the initrd to low memory region. Signed-off-by: yalin wang --- arch/arm/include/asm/fixmap.h | 1 + arch/arm/kernel/setup.c | 72

[RFC V3] regmap: change bool to 1 bit variable in struct regmap

2015-10-09 Thread yalin wang
This patch change some bool variables in struct regmap { } to be u8 v : 1 type, so that we can shrink the sizeof of struct regmap. Signed-off-by: yalin wang --- drivers/base/regmap/internal.h | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff

Re: [PATCH V4 2/3] arm64: support initrd outside kernel linear map

2015-10-08 Thread yalin wang
> On Oct 8, 2015, at 16:49, Christoffer Dall > wrote: > > On Tue, Oct 06, 2015 at 01:16:52PM -0400, Mark Salter wrote: >> On Tue, 2015-10-06 at 18:11 +0100, Mark Rutland wrote: >>> On Tue, Sep 08, 2015 at 12:31:13PM +0100, Mark Rutland wrote: Hi Mark, On Mon, Aug 17, 2015 at 06:

[RFC V2] regmap: change bool to 1 bit variable in struct regmap

2015-10-08 Thread yalin wang
This patch change some bool variables in struct regmap { } to be u8 v : 1 type, so that we can shrink the sizeof of struct regmap. Signed-off-by: yalin wang --- drivers/base/regmap/internal.h | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers

Re: [RFC] regmap: change bool to 1 bit variable in struct regmap

2015-10-08 Thread yalin wang
ok, i will send V2 patch > On Oct 8, 2015, at 16:15, Mark Brown wrote: > > On Thu, Oct 08, 2015 at 12:24:02PM +0800, yalin wang wrote: > >> +u8 async : 1, > > Please use the kernel coding style, no spaces around the :. -- To unsubscribe from this list: send the

[RFC] mm: change HIGHMEM_ZONE macro definition

2015-10-07 Thread yalin wang
Change HIGHMEM_ZONE to be the same as DMA_ZONE macro. Signed-off-by: yalin wang --- include/linux/vm_event_item.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h index 2b1cef8..b3bd7c7 100644 --- a/include

[RFC] regmap: change bool to 1 bit variable in struct regmap

2015-10-07 Thread yalin wang
This patch change some bool variables in struct regmap { } to be u8 v : 1 type, so that we can shrink the sizeof of struct regmap. Signed-off-by: yalin wang --- drivers/base/regmap/internal.h | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers

[RFC] fs: change lookup_bh_lru() to use memmove()

2015-09-28 Thread yalin wang
This patch make a little change to lookup_bh_lru() function to use memmove() to set new buffer_head, better performance for some platforms. Signed-off-by: yalin wang --- fs/buffer.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index

[RFC] fs: change bh_lru_install() implementation

2015-09-28 Thread yalin wang
This patch use swap method to implement bh_lru_install, it works like this: swap new and [0] first, update old=[0], then compare old and [1], if old != new_bh && old != NULL, swap old and [1], then start the next compare, otherwise stop the compare. Signed-off-by: yalin wang --- fs/

Re: [PATCH] fs/buffer: simplify the code flow of LRU management algorithm

2015-09-27 Thread yalin wang
why not change like this: diff --git a/fs/buffer.c b/fs/buffer.c index 82283ab..d6769f1 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1287,40 +1287,31 @@ static inline void check_irqs_on(void) */ static void bh_lru_install(struct buffer_head *bh) { - struct buffer_head *evictee = NULL;

Re: why is text address constant with full randomization?

2015-09-15 Thread yalin wang
> On Sep 15, 2015, at 16:36, 慕冬亮 wrote: > > First, my linux kernel is Linux 114-212-83-136 4.1.0-2-amd64. > Second, I copy /bin/cat in system to mycat , and see the address space > layout below. > > mdl@114-212-83-136:~$ ./mycat /proc/self/maps > 0040-0040c000 r-xp 08:03 1046776 >

Re: [PATCH] arm64: add kc_offset_to_vaddr and kc_vaddr_to_offset macro

2015-09-05 Thread yalin wang
ok i will send a V2 patch for this change. > On Sep 2, 2015, at 18:24, Will Deacon wrote: > > On Sun, Aug 30, 2015 at 07:19:59AM +0100, yalin wang wrote: >> This patch add kc_offset_to_vaddr() and kc_vaddr_to_offset(), >> the default version doesn't work on arm64, be

  1   2   >