RE: [RFC V2] proc: change /proc/stat show

2015-03-19 Thread Wang, Yalin
> -Original Message- > From: Andrew Morton [mailto:a...@linux-foundation.org] > Sent: Thursday, March 19, 2015 6:08 AM > To: Wang, Yalin > Cc: 'David Rientjes'; 'heiko.carst...@de.ibm.com'; 't...@linutronix.de'; > 'linux-kernel@vger.k

[RFC V2] proc: change /proc/stat show

2015-03-17 Thread Wang, Yalin
This patch change /proc/stat to show each cpu, we show each present cpus instead of eacn online cpu, because some cpus are online / offline dynamically, we should also show its cputime even it is offline, some lib will read this file to detect cpu numbers, we should also return the real present cpu

RE: [RFC] proc: change /proc/stat show

2015-03-17 Thread Wang, Yalin
> -Original Message- > From: David Rientjes [mailto:rient...@google.com] > Sent: Wednesday, March 18, 2015 7:02 AM > To: Wang, Yalin > Cc: a...@linux-foundation.org; heiko.carst...@de.ibm.com; > t...@linutronix.de; linux-kernel@vger.kernel.org > Subject: Re: [RFC] pr

[RFC] proc: change /proc/stat show

2015-03-17 Thread Wang, Yalin
This patch change /proc/stat to show each cpu, we show each present cpus instead of eacn online cpu, because some cpus are online / offline dynamically, we should also show its cputime even it is offline, some lib will read this file to detect cpu numbers, we should also return the real present cpu

[RFC] mm:do recheck for freeable page in reclaim path

2015-03-11 Thread Wang, Yalin
In reclaim path, if encounter a freeable page, the try_to_unmap may fail, because the page's pte is dirty, we can recheck this page as normal non-freeable page, this means we can swap out this page into swap partition. Signed-off-by: Yalin Wang --- mm/vmscan.c | 5 + 1 file changed, 5 insert

[RFC ] mm: don't ignore file map pages for madvise_free( )

2015-03-11 Thread Wang, Yalin
Hi I just want to explain my ideas about file map pages for madvise_free() syscall. As the following patch, For file map vma, there is 2 types: 1. private file map In this type, the pages of this vma are file map pages or anon page (when COW happened), 2. shared file map In this t

RE: [PATCH 3/4] mm: move lazy free pages to inactive list

2015-03-10 Thread Wang, Yalin
> -Original Message- > From: Minchan Kim [mailto:minc...@kernel.org] > Sent: Wednesday, March 11, 2015 9:21 AM > To: Andrew Morton > Cc: linux-kernel@vger.kernel.org; linux...@kvack.org; Michal Hocko; > Johannes Weiner; Mel Gorman; Rik van Riel; Shaohua Li; Wang, Ya

RE: [RFC V3] mm: change mm_advise_free to clear page dirty

2015-03-02 Thread Wang, Yalin
> -Original Message- > From: Minchan Kim [mailto:minchan@gmail.com] On Behalf Of Minchan Kim > Sent: Tuesday, March 03, 2015 12:15 PM > To: Wang, Yalin > Cc: 'Michal Hocko'; 'Andrew Morton'; 'linux-kernel@vger.kernel.org'; > 'linux..

RE: [RFC V3] mm: change mm_advise_free to clear page dirty

2015-03-02 Thread Wang, Yalin
> -Original Message- > From: Minchan Kim [mailto:minchan@gmail.com] On Behalf Of Minchan Kim > Sent: Tuesday, March 03, 2015 11:26 AM > To: Wang, Yalin > Cc: 'Michal Hocko'; 'Andrew Morton'; 'linux-kernel@vger.kernel.org'; > 'linux..

[RFC V3] mm: change mm_advise_free to clear page dirty

2015-03-02 Thread Wang, Yalin
This patch add ClearPageDirty() to clear AnonPage dirty flag, if not clear page dirty for this anon page, the page will never be treated as freeable. We also make sure the shared AnonPage is not freeable, we implement it by dirty all copyed AnonPage pte, so that make sure the Anonpage will not beco

RE: [RFC] mm: change mm_advise_free to clear page dirty

2015-03-01 Thread Wang, Yalin
> -Original Message- > From: Minchan Kim [mailto:minchan@gmail.com] On Behalf Of Minchan Kim > Sent: Saturday, February 28, 2015 9:50 PM > To: Wang, Yalin > Cc: Michal Hocko; Andrew Morton; linux-kernel@vger.kernel.org; linux- > m...@kvack.org; Rik van Riel; Johannes

RE: [RFC] mm: change mm_advise_free to clear page dirty

2015-03-01 Thread Wang, Yalin
> -Original Message- > From: Minchan Kim [mailto:minchan@gmail.com] On Behalf Of Minchan Kim > Sent: Saturday, February 28, 2015 9:56 PM > To: Wang, Yalin > Cc: 'Michal Hocko'; Andrew Morton; linux-kernel@vger.kernel.org; linux- > m...@kvack.org; Rik va

[RFC V2] mm: change mm_advise_free to clear page dirty

2015-02-27 Thread Wang, Yalin
This patch add ClearPageDirty() to clear AnonPage dirty flag, if not clear page dirty for this anon page, the page will never be treated as freeable. we also make sure the shared AnonPage is not freeable, we implement it by dirty all copyed AnonPage pte, so that make sure the Anonpage will not beco

RE: [RFC] mm: change mm_advise_free to clear page dirty

2015-02-27 Thread Wang, Yalin
> -Original Message- > From: Michal Hocko [mailto:msts...@gmail.com] On Behalf Of Michal Hocko > Sent: Saturday, February 28, 2015 5:03 AM > To: Wang, Yalin > Cc: 'Minchan Kim'; Andrew Morton; linux-kernel@vger.kernel.org; linux- > m...@kvack.org; Rik van Riel;

RE: [RFC] mm: change mm_advise_free to clear page dirty

2015-02-26 Thread Wang, Yalin
> -Original Message- > From: Minchan Kim [mailto:minchan@gmail.com] On Behalf Of Minchan Kim > Sent: Friday, February 27, 2015 2:44 PM > To: Wang, Yalin > Cc: Michal Hocko; Andrew Morton; linux-kernel@vger.kernel.org; linux- > m...@kvack.org; Rik van Riel; Johannes

RE: [RFC] mm: change mm_advise_free to clear page dirty

2015-02-26 Thread Wang, Yalin
> -Original Message- > From: Minchan Kim [mailto:minchan@gmail.com] On Behalf Of Minchan Kim > Sent: Friday, February 27, 2015 1:28 PM > To: Wang, Yalin > Cc: Michal Hocko; Andrew Morton; linux-kernel@vger.kernel.org; linux- > m...@kvack.org; Rik van Riel; Johannes

[RFC] mm: change mm_advise_free to clear page dirty

2015-02-26 Thread Wang, Yalin
This patch add ClearPageDirty() to clear AnonPage dirty flag, the Anonpage mapcount must be 1, so that this page is only used by the current process, not shared by other process like fork(). if not clear page dirty for this anon page, the page will never be treated as freeable. Signed-off-by: Yali

[RFC V3] test bit before clear files_struct bits

2015-02-15 Thread Wang, Yalin
Test bit before clear close_on_exec and open_fds, by trace __clear_bit(), these 2 place are false in most times, we test it so that we don't need clear_bit, and we can win in most time. Add *_if_need bitop non-atomic version. Signed-off-by: Yalin Wang --- fs/file.c

[RFC V2] test_bit before clear files_struct bits

2015-02-09 Thread Wang, Yalin
add test_bit() before clear close_on_exec and open_fds, by trace __clear_bit(), these 2 place are false in most times, we test it so that we don't need clear_bit, and we can win in most time. Signed-off-by: Yalin Wang --- fs/file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[RFC] test_bit before clear files_struct bits

2015-02-09 Thread Wang, Yalin
add test_bit() before clear close_on_exec and open_fds, by trace __clear_bit(), these 2 place are false in most times, we test it so that we don't need dirty cacheline, and we can win in most time. Signed-off-by: Yalin Wang --- fs/file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

RE: [RFC] change non-atomic bitops method

2015-02-09 Thread Wang, Yalin
> -Original Message- > From: Andrew Morton [mailto:a...@linux-foundation.org] > Sent: Tuesday, February 10, 2015 4:34 AM > To: Wang, Yalin > Cc: 'Kirill A. Shutemov'; 'a...@arndb.de'; 'linux-a...@vger.kernel.org'; > 'linux-kernel@v

RE: [RFC] change non-atomic bitops method

2015-02-09 Thread Wang, Yalin
> -Original Message- > From: Andrew Morton [mailto:a...@linux-foundation.org] > Sent: Tuesday, February 03, 2015 6:59 PM > To: Wang, Yalin > Cc: 'Kirill A. Shutemov'; 'a...@arndb.de'; 'linux-a...@vger.kernel.org'; > 'linux-kernel@v

RE: [RFC] change non-atomic bitops method

2015-02-03 Thread Wang, Yalin
> -Original Message- > From: Rasmus Villemoes [mailto:li...@rasmusvillemoes.dk] > Sent: Tuesday, February 03, 2015 5:34 PM > To: Andrew Morton > Cc: Wang, Yalin; 'Kirill A. Shutemov'; 'a...@arndb.de'; 'linux- > a...@vger.kernel.

RE: [RFC] change non-atomic bitops method

2015-02-03 Thread Wang, Yalin
> -Original Message- > From: Wang, Yalin > Sent: Tuesday, February 03, 2015 3:04 PM > To: 'Andrew Morton' > Cc: 'Kirill A. Shutemov'; 'a...@arndb.de'; 'linux-a...@vger.kernel.org'; > 'linux-kernel@vger.kernel.org'

RE: [RFC] change non-atomic bitops method

2015-02-02 Thread Wang, Yalin
> -Original Message- > From: Andrew Morton [mailto:a...@linux-foundation.org] > Sent: Tuesday, February 03, 2015 2:39 PM > To: Wang, Yalin > Cc: 'Kirill A. Shutemov'; 'a...@arndb.de'; 'linux-a...@vger.kernel.org'; > 'linux-kernel@v

RE: [RFC] change non-atomic bitops method

2015-02-02 Thread Wang, Yalin
> -Original Message- > From: Wang, Yalin > Sent: Tuesday, February 03, 2015 10:13 AM > To: 'Kirill A. Shutemov'; Andrew Morton > Cc: 'a...@arndb.de'; 'linux-a...@vger.kernel.org'; 'linux- > ker...@vger.kernel.org'; 'li

RE: [RFC] change non-atomic bitops method

2015-02-02 Thread Wang, Yalin
> -Original Message- > From: Kirill A. Shutemov [mailto:kir...@shutemov.name] > Sent: Tuesday, February 03, 2015 9:18 AM > To: Andrew Morton > Cc: Wang, Yalin; 'a...@arndb.de'; 'linux-a...@vger.kernel.org'; 'linux- > ker...@vger.kernel.org&#x

[RFC] change non-atomic bitops method

2015-02-01 Thread Wang, Yalin
This patch change non-atomic bitops, add a if() condition to test it, before set/clear the bit. so that we don't need dirty the cache line, if this bit have been set or clear. On SMP system, dirty cache line will need invalidate other processors cache line, this will have some impact on SMP systems

RE: [RFC V2] mm:change smaps/pagemap_read calculation behavior

2015-01-30 Thread Wang, Yalin
> -Original Message- > From: Naoya Horiguchi [mailto:n-horigu...@ah.jp.nec.com] > Sent: Friday, January 30, 2015 4:24 PM > To: Wang, Yalin > Cc: 'a...@linux-foundation.org'; 'kirill.shute...@linux.intel.com'; > 'o...@redhat.com'; &#x

[RFC V2] mm:change smaps/pagemap_read calculation behavior

2015-01-29 Thread Wang, Yalin
This patch change smaps/pagemap_read pagetable walk behavior, to make sure not skip VM_PFNMAP pagetables, so that we can calculate COW pages of VM_PFNMAP as normal pages. Signed-off-by: Yalin Wang --- fs/proc/task_mmu.c | 2 ++ include/linux/mm.h | 2 ++ mm/pagewalk.c | 5 + 3 files cha

[RFC] mm:change /proc/smaps caculation behavior

2015-01-29 Thread Wang, Yalin
This patch change smaps pagetable walk behavior, to make sure not skip VM_PFNMAP pagetables, so that we can calculate COW pages of VM_PFNMAP as normal pages. Signed-off-by: Yalin Wang --- fs/proc/task_mmu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/fs/proc/task_mmu.c b/fs/p

RE: [RFC] ion:change ion_cma_allocate return error value

2015-01-28 Thread Wang, Yalin
> -Original Message- > From: 'gre...@linuxfoundation.org' [mailto:gre...@linuxfoundation.org] > Sent: Thursday, January 29, 2015 2:45 AM > To: Wang, Yalin > Cc: 'tranmanph...@gmail.com'; 'fabio.este...@freescale.com'; > 'prime.z...@hua

[PATCH] xfs:change kmem_free to use generic kvfree()

2015-01-27 Thread Wang, Yalin
Change kmem_free to use kvfree() generic function, remove the duplicated code. Signed-off-by: Yalin Wang --- fs/xfs/kmem.c | 10 -- fs/xfs/kmem.h | 5 - 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/fs/xfs/kmem.c b/fs/xfs/kmem.c index 53e95b2..a7a3a63 100644 --- a/

[PATCH] agp:change agp_free_page_array to use kvfree

2015-01-27 Thread Wang, Yalin
Change agp_free_page_array to use kvfree function, remove the duplicated code. Signed-off-by: Yalin Wang --- drivers/char/agp/agp.h | 5 - drivers/char/agp/generic.c | 11 --- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/char/agp/agp.h b/drivers/char/a

[RFC] ion:change ion_cma_allocate return error value

2015-01-26 Thread Wang, Yalin
This patch change the error return value from -1 to -ENOMEM, so that userspace can get the correct errno, otherwise, -1 will be -EPERM, userspace will print permission deny for allocation failure. Signed-off-by: Yalin Wang --- drivers/staging/android/ion/ion_cma_heap.c | 6 ++ 1 file changed

RE: [RFC] export module parameters even the permission is zero

2015-01-21 Thread Wang, Yalin
> -Original Message- > From: Rusty Russell [mailto:ru...@rustcorp.com.au] > Sent: Tuesday, January 20, 2015 2:33 PM > To: Wang, Yalin; 'a...@linux-foundation.org'; 'jani.nik...@intel.com'; > 'h...@infradead.org'; 'h...@suse.de'; &#

RE: [RFC V6 2/3] arm:add bitrev.h file to support rbit instruction

2015-01-15 Thread Wang, Yalin
> -Original Message- > From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] > Sent: Thursday, January 15, 2015 12:38 AM > To: Wang, Yalin > Cc: 'Ard Biesheuvel'; 'Will Deacon'; 'linux-kernel@vger.kernel.org'; > 'akinobu.m...@gm

[RFC] export module parameters even the permission is zero

2015-01-13 Thread Wang, Yalin
This patch make sure to export module parameters even the permission is zero, this is useful for some platforms like Android, the init process can change the parameter mode/owner by chmod/chown during bootup Signed-off-by: Yalin Wang --- kernel/params.c | 6 -- 1 file changed, 6 deletions(-)

FW: [RFC V6 2/3 resend] arm:add bitrev.h file to support rbit instruction

2015-01-11 Thread Wang, Yalin
> -Original Message- > From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] > Sent: Friday, January 09, 2015 7:11 PM > To: Wang, Yalin > Cc: 'Ard Biesheuvel'; 'Will Deacon'; 'linux-kernel@vger.kernel.org'; > 'akinob

RE: [RFC V6 2/3] arm:add bitrev.h file to support rbit instruction

2015-01-09 Thread Wang, Yalin
> -Original Message- > From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] > Sent: Friday, January 09, 2015 7:11 PM > To: Wang, Yalin > Cc: 'Ard Biesheuvel'; 'Will Deacon'; 'linux-kernel@vger.kernel.org'; > 'akinobu.m...@gm

RE: [RFC] mmc:change mmc_init workqueue into a freezable workqueue

2015-01-08 Thread Wang, Yalin
> -Original Message- > From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] > Sent: Thursday, January 08, 2015 7:42 PM > To: Wang, Yalin > Cc: 'ch...@printf.net'; 'ulf.hans...@linaro.org'; 'tim.kry...@gmail.com'; > 'tgih...

RE: [RFC V6 2/3] arm:add bitrev.h file to support rbit instruction

2015-01-08 Thread Wang, Yalin
> -Original Message- > From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] > Sent: Friday, January 09, 2015 2:41 AM > To: Wang, Yalin > Cc: 'Will Deacon'; 'Ard Biesheuvel'; 'linux-kernel@vger.kernel.org'; > 'akinobu.m...@gm

[RFC V2] mmc:change mmc_init workqueue into a freezable workqueue

2015-01-08 Thread Wang, Yalin
This patch fix the mmc driver suspend/resume conflict problems, mmc workqueue will queue mmc_rescan(), and it will call some pm_runtime_* functions, this will conflict with suspend path sometimes, and will result in some strange behavior: Suspend path: -000 |context_switch(inline)

[RFC] mmc:change mmc_init workqueue into a freezable workqueue

2015-01-08 Thread Wang, Yalin
This patch fix the mmc driver suspend/resume conflict problems, mmc workqueue will queue mmc_rescan(), and it will call some pm_runtime_* functions, this will conflict with suspend path sometimes, and will result in some strange behavior: Suspend path: -000 |context_switch(inline)

[RFC] mm:change meminfo cached calculation

2014-12-26 Thread Wang, Yalin
This patch subtract sharedram from cached, sharedram can only be swap into swap partitions, they should be treated as swap pages, not as cached pages. Signed-off-by: Yalin Wang --- fs/proc/meminfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/meminfo.c b/fs/proc/m

RE: [RFC] MADV_FREE doesn't work when doesn't have swap partition

2014-12-18 Thread Wang, Yalin
> -Original Message- > From: Minchan Kim [mailto:minc...@kernel.org] > Sent: Friday, December 19, 2014 9:05 AM > To: Wang, Yalin > Cc: 'Konstantin Khlebnikov'; 'Kirill A. Shutemov'; 'Andrew Morton'; 'linux- > ker...@vger

[RFC] MADV_FREE doesn't work when doesn't have swap partition

2014-12-17 Thread Wang, Yalin
I notice this commit: mm: support madvise(MADV_FREE), it can free clean anonymous pages directly, doesn't need pageout to swap partition, but I found it doesn't work on my platform, which don't enable any swap partitions. I make a change for this. Just to explain my issue clearly, Do we need som

[PATCH] regmap:change spinlock_flags into the union

2014-12-15 Thread Wang, Yalin
This patch move struct regmap.spinlock_flags into the union of spinlock, so that we can shrink struct regmap size. Signed-off-by: Yalin Wang --- drivers/base/regmap/internal.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/base/regmap/internal.h b/drivers/base/

[RFC] discard task stack pages instead of pageout into swap partition

2014-12-11 Thread Wang, Yalin
Hi, I am think of discard stack pages if the old Page is under the stack pointer(Assume stack grow down) of the task, This page don't need pageout, we can free it directly, When the task need it again, we just use a zero page to Map, it is safe for stack . But I don't know how to implement it, An

RE: [RFC] mm:fix zero_page huge_zero_page rss/pss statistic

2014-12-11 Thread Wang, Yalin
> -Original Message- > From: Kirill A. Shutemov [mailto:kir...@shutemov.name] > Sent: Wednesday, December 10, 2014 7:06 PM > To: Wang, Yalin > Cc: 'Andrew Morton'; 'Konstantin Khlebnikov'; 'linux- > ker...@vger.kernel.org'; 'linux...

[RFC] mm:fix zero_page huge_zero_page rss/pss statistic

2014-12-09 Thread Wang, Yalin
smaps_pte_entry() doesn't ignore zero_huge_page, but it ignore zero_page, because vm_normal_page() will ignore it. We remove vm_normal_page() call, because walk_page_range() have ignore VM_PFNMAP vma maps, it's safe to just use pfn_valid(), so that we can also consider zero_page to be a valid page.

[PATCH V3] fix build error for vm tools

2014-12-08 Thread Wang, Yalin
This patch fix the build error when make like this: make O=/xx/x vm use $(OUTPUT) to generate to the right place. Signed-off-by: Yalin Wang --- tools/lib/api/Makefile | 2 +- tools/vm/Makefile | 14 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/lib/a

[PATCH V2] fix build error for vm tools

2014-12-08 Thread Wang, Yalin
This patch fix the build error when make like this: make O=/xx/x vm use $(OUTPUT) to generate to the right place. Signed-off-by: Yalin Wang --- tools/vm/Makefile | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/vm/Makefile b/tools/vm/Makefile index 3d907da..2

[PATCH] fix build error for vm tools

2014-12-08 Thread Wang, Yalin
This patch fix the build error when make like this: make O=/xx/x vm use $(OUTPUT) to generate to the right place. Signed-off-by: Yalin Wang --- tools/vm/Makefile | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/vm/Makefile b/tools/vm/Makefile index 3d907da..28d

[RFC V5] mm:add KPF_ZERO_PAGE flag for /proc/kpageflags

2014-12-08 Thread Wang, Yalin
This patch add KPF_ZERO_PAGE flag for zero_page, so that userspace process can notice zero_page from /proc/kpageflags, and then do memory analysis more accurately. Signed-off-by: Yalin Wang --- Documentation/vm/pagemap.txt | 8 fs/proc/page.c | 16

[PATCH V3] mm:add VM_BUG_ON_PAGE() for page_mapcount()

2014-12-08 Thread Wang, Yalin
This patch add VM_BUG_ON_PAGE() for slab page, because _mapcount is an union with slab struct in struct page, avoid access _mapcount if this page is a slab page. Also remove the unneeded bracket. Signed-off-by: Yalin Wang --- include/linux/mm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

[PATCH V2] mm:add VM_BUG_ON() for page_mapcount()

2014-12-08 Thread Wang, Yalin
This patch add VM_BUG_ON_PAGE() for slab page, because _mapcount is an union with slab struct in struct page, avoid access _mapcount if this page is a slab page. Also remove the unneeded bracket. Signed-off-by: Yalin Wang --- include/linux/mm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

RE: [PATCH] mm:add VM_BUG_ON() for page_mapcount()

2014-12-08 Thread Wang, Yalin
> -Original Message- > From: Hillf Danton [mailto:hillf...@alibaba-inc.com] > Sent: Monday, December 08, 2014 5:33 PM > To: Wang, Yalin > Cc: linux-kernel; linux...@kvack.org; linux-arm-ker...@lists.infradead.org; > Andrew Morton; Hillf Danton > Subject: Re: [PATCH] m

[PATCH] mm:add VM_BUG_ON() for page_mapcount()

2014-12-07 Thread Wang, Yalin
This patch add VM_BUG_ON() for slab page, because _mapcount is an union with slab struct in struct page, avoid access _mapcount if this page is a slab page. Also remove the unneeded bracket. Signed-off-by: Yalin Wang --- include/linux/mm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[RFC V4] mm:add KPF_ZERO_PAGE flag for /proc/kpageflags

2014-12-07 Thread Wang, Yalin
This patch add KPF_ZERO_PAGE flag for zero_page, so that userspace process can notice zero_page from /proc/kpageflags, and then do memory analysis more accurately. Signed-off-by: Yalin Wang --- Documentation/vm/pagemap.txt | 5 + fs/proc/page.c | 16 +++

[RFC V3] mm:add KPF_ZERO_PAGE flag for /proc/kpageflags

2014-12-07 Thread Wang, Yalin
This patch add KPF_ZERO_PAGE flag for zero_page, so that userspace process can notice zero_page from /proc/kpageflags, and then do memory analysis more accurately. Signed-off-by: Yalin Wang --- fs/proc/page.c | 16 +--- include/linux/huge_mm.h|

RE: [RFC] mm:add KPF_ZERO_PAGE flag for /proc/kpageflags

2014-12-05 Thread Wang, Yalin
> -Original Message- > From: Konstantin Khlebnikov [mailto:koc...@gmail.com] > Sent: Friday, December 05, 2014 5:21 PM > To: Wang, Yalin > Cc: linux-kernel@vger.kernel.org; linux...@kvack.org; linux-arm- > ker...@lists.infradead.org; a...@linux-foundation.org; n- > ho

[RFC V2] mm:add KPF_ZERO_PAGE flag for /proc/kpageflags

2014-12-05 Thread Wang, Yalin
This patch add KPF_ZERO_PAGE flag for zero_page, so that userspace process can notice zero_page from /proc/kpageflags, and then do memory analysis more accurately. Signed-off-by: Yalin Wang --- fs/proc/page.c | 14 +++--- include/linux/huge_mm.h| 1

[RFC] mm:add KPF_ZERO_PAGE flag for /proc/kpageflags

2014-12-05 Thread Wang, Yalin
This patch add KPF_ZERO_PAGE flag for zero_page, so that userspace process can notice zero_page from /proc/kpageflags, and then do memory analysis more accurately. Signed-off-by: Yalin Wang --- fs/proc/page.c | 3 +++ include/uapi/linux/kernel-page-flags.h | 1 + 2 files

RE: [RFC V2] mm:add zero_page _mapcount when mapped into user space

2014-12-05 Thread Wang, Yalin
> -Original Message- > From: Konstantin Khlebnikov [mailto:koc...@gmail.com] > Sent: Friday, December 05, 2014 2:39 PM > To: Kirill A. Shutemov > Cc: Wang, Yalin; linux-kernel@vger.kernel.org; linux...@kvack.org; linux- > arm-ker...@lists.infradead.org > Subject

RE: [RFC] fdt:free the fdt reserved memory

2014-12-04 Thread Wang, Yalin
> -Original Message- > From: glik...@secretlab.ca [mailto:glik...@secretlab.ca] On Behalf Of Grant > Likely > Sent: Thursday, December 04, 2014 8:46 PM > To: Wang, Yalin > Cc: robh...@kernel.org; devicet...@vger.kernel.org; pawel.m...@arm.com; > mark.rutl...

RE: [RFC v2] arm:extend the reserved mrmory for initrd to be page aligned

2014-12-04 Thread Wang, Yalin
> -Original Message- > From: Catalin Marinas [mailto:catalin.mari...@arm.com] > Sent: Thursday, December 04, 2014 8:03 PM > To: Russell King - ARM Linux > Cc: Wang, Yalin; 'linux...@kvack.org'; Will Deacon; 'linux- > ker...@vger.kernel.org'; 'li

RE: [RFC] fdt:free the fdt reserved memory

2014-12-04 Thread Wang, Yalin
> -Original Message- > From: Grant Likely [mailto:glik...@secretlab.ca] On Behalf Of Grant Likely > Sent: Thursday, December 04, 2014 6:05 PM > To: Wang, Yalin; 'robh...@kernel.org'; 'devicet...@vger.kernel.org'; > 'pawel.m...@arm.com&

RE: [RFC] fdt:free the fdt reserved memory

2014-12-03 Thread Wang, Yalin
> -Original Message- > From: Grant Likely [mailto:glik...@secretlab.ca] On Behalf Of Grant Likely > Sent: Wednesday, September 24, 2014 10:45 PM > To: Wang, Yalin; 'robh...@kernel.org'; 'devicet...@vger.kernel.org'; > 'pawel.m...@arm.com&

RE: [RFC V2] mm:add zero_page _mapcount when mapped into user space

2014-12-03 Thread Wang, Yalin
> -Original Message- > From: Kirill A. Shutemov [mailto:kir...@shutemov.name] > Sent: Tuesday, December 02, 2014 7:30 PM > To: Wang, Yalin > Cc: 'linux-kernel@vger.kernel.org'; 'linux...@kvack.org'; 'linux-arm- > ker...@lists.infradead.or

[RFC V2] mm:add zero_page _mapcount when mapped into user space

2014-12-02 Thread Wang, Yalin
This patch add/dec zero_page's _mapcount to make sure the mapcount is correct for zero_page, so that when read from /proc/kpagecount, zero_page's mapcount is also correct, userspace process like procrank can calculate PSS correctly. Signed-off-by: Yalin Wang --- mm/memory.c | 2 ++ 1 file change

[RFC] mm:add zero_page _mapcount when mapped into user space

2014-12-02 Thread Wang, Yalin
This patch add/dec zero_page's _mapcount to make sure the mapcount is correct for zero_page, so that when read from /proc/kpagecount, zero_page's mapcount is also correct, userspace process like procrank can calculate PSS correctly. Signed-off-by: Yalin Wang --- mm/memory.c | 2 ++ 1 file change

RE: [RFC V6 2/3] arm:add bitrev.h file to support rbit instruction

2014-11-16 Thread Wang, Yalin
> From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] > Sent: Friday, November 14, 2014 5:58 PM > To: Wang, Yalin > Cc: 'Will Deacon'; 'Ard Biesheuvel'; 'linux-kernel@vger.kernel.org'; > 'akinobu.m...@gmail.com';

RE: [PATCH] carl9170: Convert byte_rev_table uses to bitrev8

2014-11-13 Thread Wang, Yalin
> From: Joe Perches [mailto:j...@perches.com] > Sent: Friday, November 14, 2014 1:33 PM > To: Wang, Yalin > Cc: 'chunk...@googlemail.com'; 'linvi...@tuxdriver.com'; 'linux- > wirel...@vger.kernel.org'; 'net...@vger.kernel.org'; 'linu

[PATCH] carl9170: Convert byte_rev_table uses to bitrev8

2014-11-13 Thread Wang, Yalin
Use the inline function instead of directly indexing the array. This allows some architectures with hardware instructions for bit reversals to eliminate the array. Signed-off-by: Joe Perches Signed-off-by: Yalin Wang --- drivers/net/wireless/ath/carl9170/phy.c | 4 ++-- 1 file changed, 2 inser

[PATCH] 6fire: Convert byte_rev_table uses to bitrev8

2014-11-13 Thread Wang, Yalin
Use the inline function instead of directly indexing the array. This allows some architectures with hardware instructions for bit reversals to eliminate the array. Signed-off-by: Joe Perches Signed-off-by: Yalin Wang --- sound/usb/6fire/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

RE: [RFC V6 2/3] arm:add bitrev.h file to support rbit instruction

2014-11-13 Thread Wang, Yalin
> -Original Message- > From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] > Sent: Friday, November 14, 2014 7:53 AM > To: Wang, Yalin > > On Fri, Oct 31, 2014 at 01:42:44PM +0800, Wang, Yalin wrote: > > This patch add bitrev.h file to support rbit

RE: [RFC V6 3/3] arm64:add bitrev.h file to support rbit instruction

2014-11-03 Thread Wang, Yalin
> From: Will Deacon [mailto:will.dea...@arm.com] > > > > If this is the case, I suggest you update patch 8187/1 to retain the > > byte_rev_table symbol, even in the accelerated case, and remove it > > with a followup patch once Joe's patches have landed upstream. Also, a > > link to the patches wou

RE: [RFC V6 3/3] arm64:add bitrev.h file to support rbit instruction

2014-11-02 Thread Wang, Yalin
> From: Will Deacon [mailto:will.dea...@arm.com] > > +#ifndef __ASM_ARM64_BITREV_H > > +#define __ASM_ARM64_BITREV_H > > Really minor nit, but we don't tend to include 'ARM64' in our header guards, > so this should just be __ASM_BITREV_H. > > With that change, > > Acked-by: Will Deacon > I h

[RFC V2] arm:remove clear_thread_flag(TIF_UPROBE)

2014-10-31 Thread Wang, Yalin
This patch remove clear_thread_flag(TIF_UPROBE) in do_work_pending(), because uprobe_notify_resume() have do this. Signed-off-by: Yalin Wang --- arch/arm/kernel/signal.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index bd19834..8aa6f1b

RE: [RFC] arm:remove clear_thread_flag(TIF_UPROBE)

2014-10-31 Thread Wang, Yalin
> From: Joe Perches [mailto:j...@perches.com] > > > > @@ -591,10 +591,9 @@ do_work_pending(struct pt_regs *regs, unsigned > int > > > thread_flags, int syscall) > > > > return restart; > > > > } > > > >

RE: [RFC V6 2/3] add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-31 Thread Wang, Yalin
> From: Wang, Yalin > Subject: [RFC V6 2/3] add CONFIG_HAVE_ARCH_BITREVERSE to support rbit > instruction > > This patch add bitrev.h file to support rbit instruction, so that we can do > bitrev operation by hardware. > Signed-off-by: Yalin Wang > --- > arch/ar

RE: [RFC] arm:remove clear_thread_flag(TIF_UPROBE)

2014-10-31 Thread Wang, Yalin
> From: Joe Perches [mailto:j...@perches.com] > > diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c > [] > > @@ -591,10 +591,9 @@ do_work_pending(struct pt_regs *regs, unsigned int > thread_flags, int syscall) > > return restart; > >

[RFC] arm:remove clear_thread_flag(TIF_UPROBE)

2014-10-31 Thread Wang, Yalin
This patch remove clear_thread_flag(TIF_UPROBE) in do_work_pending(), because uprobe_notify_resume() have do this. Signed-off-by: Yalin Wang --- arch/arm/kernel/signal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c i

[RFC V6 2/3] arm:add bitrev.h file to support rbit instruction

2014-10-30 Thread Wang, Yalin
This patch add bitrev.h file to support rbit instruction, so that we can do bitrev operation by hardware. Signed-off-by: Yalin Wang --- arch/arm/Kconfig | 1 + arch/arm/include/asm/bitrev.h | 21 + 2 files changed, 22 insertions(+) create mode 100644 arch/arm/in

[RFC V6 3/3] arm64:add bitrev.h file to support rbit instruction

2014-10-30 Thread Wang, Yalin
This patch add bitrev.h file to support rbit instruction, so that we can do bitrev operation by hardware. Signed-off-by: Yalin Wang --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/bitrev.h | 21 + 2 files changed, 22 insertions(+) create mode 100644 arch/ar

[RFC V6 2/3] add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-30 Thread Wang, Yalin
This patch add bitrev.h file to support rbit instruction, so that we can do bitrev operation by hardware. Signed-off-by: Yalin Wang --- arch/arm/Kconfig | 1 + arch/arm/include/asm/bitrev.h | 21 + 2 files changed, 22 insertions(+) create mode 100644 arch/arm/in

[RFC V6 1/3] add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-30 Thread Wang, Yalin
this change add CONFIG_HAVE_ARCH_BITREVERSE config option, so that we can use some architecture's bitrev hardware instruction to do bitrev operation. Introduce __constant_bitrev* macro for constant bitrev operation. Change __bitrev16() __bitrev32() to be inline function, don't need export symbol

RE: [RFC V5 3/3] arm64:add bitrev.h file to support rbit instruction

2014-10-30 Thread Wang, Yalin
> From: Will Deacon [mailto:will.dea...@arm.com] > Sent: Thursday, October 30, 2014 8:01 PM > To: Wang, Yalin > Cc: 'Rob Herring'; 'Joe Perches'; 'Russell King - ARM Linux'; 'linux- > ker...@vger.kernel.org'; 'akinobu.m...@gmail.com

[RFC V5 3/3] arm64:add bitrev.h file to support rbit instruction

2014-10-28 Thread Wang, Yalin
This patch add bitrev.h file to support rbit instruction, so that we can do bitrev operation by hardware. Signed-off-by: Yalin Wang --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/bitrev.h | 28 2 files changed, 29 insertions(+) create mode 100644

[RFC V5 2/3] arm:add bitrev.h file to support rbit instruction

2014-10-28 Thread Wang, Yalin
This patch add bitrev.h file to support rbit instruction, so that we can do bitrev operation by hardware. Signed-off-by: Yalin Wang --- arch/arm/Kconfig | 1 + arch/arm/include/asm/bitrev.h | 28 2 files changed, 29 insertions(+) create mode 100644 arch

[RFC V5 1/3] add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-28 Thread Wang, Yalin
this change add CONFIG_HAVE_ARCH_BITREVERSE config option, so that we can use arm/arm64 rbit instruction to do bitrev operation by hardware. Change bitrev16() bitrev32() to be inline function, don't need export symbol for these tiny functions. Signed-off-by: Yalin Wang --- include/linux/bitrev.

RE: [RFC V4 1/3] add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-28 Thread Wang, Yalin
> From: Joe Perches [mailto:j...@perches.com] > > We also change byte_rev_table[] to be static, to make sure no drivers > > can access it directly. > > You break the build with this patch. > > You can't do this until the users of the table are converted. > > So far, they are not. > > I submitte

RE: [RFC V2] arm/arm64:add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-28 Thread Wang, Yalin
> From: Rob Herring [mailto:robherri...@gmail.com] > >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index > >> 9532f8d..263c28c 100644 > >> --- a/arch/arm64/Kconfig > >> +++ b/arch/arm64/Kconfig > >> @@ -36,6 +36,7 @@ config ARM64 > >> select HARDIRQS_SW_RESEND > >> select HAVE

[RFC V4 3/3] arm64:add bitrev.h file to support rbit instruction

2014-10-28 Thread Wang, Yalin
This patch add bitrev.h file to support rbit instruction, so that we can do bitrev operation by hardware. Signed-off-by: Yalin Wang --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/bitrev.h | 28 2 files changed, 29 insertions(+) create mode 100644

[RFC V4 2/3] arm:add bitrev.h file to support rbit instruction

2014-10-28 Thread Wang, Yalin
This patch add bitrev.h file to support rbit instruction, so that we can do bitrev operation by hardware. Signed-off-by: Yalin Wang --- arch/arm/Kconfig | 1 + arch/arm/include/asm/bitrev.h | 28 2 files changed, 29 insertions(+) create mode 100644 arch

[RFC V4 1/3] add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-28 Thread Wang, Yalin
this change add CONFIG_HAVE_ARCH_BITREVERSE config option, so that we can use arm/arm64 rbit instruction to do bitrev operation by hardware. We also change byte_rev_table[] to be static, to make sure no drivers can access it directly. Change bitrev16() bitrev32() to be inline function, don't need

RE: [PATCH] 6fire: Convert byte_rev_table uses to bitrev8

2014-10-28 Thread Wang, Yalin
> From: Joe Perches [mailto:j...@perches.com] > > I think the most safe way is change byte_rev_table[] to be satic, So > > that no driver can access it directly, The build error can remind the > > developer if they use byte_rev_table[] Directly . > > You can do that with your later patch, but the

RE: [RFC V3] arm/arm64:add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-28 Thread Wang, Yalin
> From: Will Deacon [mailto:will.dea...@arm.com] > Yup, sorry, I didn't realise this patch covered both architectures. It > would probably be a good idea to split it into 3 parts: a core part, then > the two architectural bits. > > Will Ok , I will split the patch into three parts, And send again

RE: [PATCH] 6fire: Convert byte_rev_table uses to bitrev8

2014-10-28 Thread Wang, Yalin
> On Mon, 2014-10-27 at 14:37 +0800, Wang, Yalin wrote: > > > this change add CONFIG_HAVE_ARCH_BITREVERSE config option, so that > > > we can use arm/arm64 rbit instruction to do bitrev operation by > > > hardware. > [] > > > diff --git a/include/linux/

  1   2   >