Re: [PATCH] staging: android: ion: fix sys heap pool's gfp_flags

2019-01-31 Thread Chen Feng
Thanks. On 2019/2/1 14:59, Qing Xia wrote: > In the first loop, gfp_flags will be modified to high_order_gfp_flags, > and there will be no chance to change back to low_order_gfp_flags. > > Fixes: e7f63771 ("ION: Sys_heap: Add cached pool to spead up cached buffer > alloc") > Signed-off-by: Qing

Re: [Linaro-mm-sig] [PATCH v3] staging: android: ion: Zero CMA allocated memory

2018-01-26 Thread Chen Feng
On 2018/1/27 1:48, Liam Mark wrote: > Since commit 204f672255c2 ("staging: android: ion: Use CMA APIs directly") > the CMA API is now used directly and therefore the allocated memory is no > longer automatically zeroed. > > Explicitly zero CMA allocated memory to ensure that no data is exposed

Re: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting

2018-01-08 Thread Chen Feng
On 2018/1/9 18:43, Zeng Tao wrote: > This issue is introduced by the commit ("ION: Sys_heap: > Add cached pool to spead up cached buffer alloc"), the gfp_mask low > order pool is overlapped by the high order inside the loop, so the > gfp_mask of all pools are set to high_order_gfp_flags. >

[PATCH] staging: ion: remove __GFP_NOWARN when use low order gfp flags

2016-07-29 Thread Chen Feng
It's useful to show the current memory in detail when alloc failed. And, there may be a lot of high order alloc failed, just show memory when an order 0 alloc failed. Signed-off-by: Chen Feng <puck.c...@hisilicon.com> --- drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file chan

Re: [PATCH v2] ION: Sys_heap: Add cached pool to spead up cached buffer alloc

2016-06-17 Thread Chen Feng
Greg, I checkout your staging tree[1]. Not find this patch. Can you take it thanks! [1]git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git On 2016/6/5 23:02, Greg KH wrote: > On Sun, Jun 05, 2016 at 04:51:23PM +0800, Chen Feng wrote: >> Hi Greg, >> >> Ca

Re: [PATCH v2] android: binder: fix dangling pointer comparison

2016-06-17 Thread Chen Feng
;vma_vm_mm pointer will be compared to current->mm. > > Let the binder take a reference to the mm_struct to avoid this. > > v2: use the right refcounter > > Fixes: a906d6931f3ccaf7de805643190765ddd7378e27 > Signed-off-by: Jann Horn <ja...@google.com>

Re: [Linaro-mm-sig] [RFC][PATCH 0/6] ion: improved ABI

2016-06-07 Thread Chen Feng
The idea is good, define the heap ids in header file is inconvenient. But if we query the heaps information from user-space. It need to maintain this ids and name userspace one by one. The code may be complicated in different module user-space. In android, the gralloc and other lib will all use

Re: [PATCH v2] ION: Sys_heap: Add cached pool to spead up cached buffer alloc

2016-06-05 Thread Chen Feng
Hi Greg, Can you take this patch? Thanks On 2016年05月24日 06:32, Laura Abbott wrote: > On 05/18/2016 08:03 PM, Chen Feng wrote: >> Add ion cached pool in system heap. This patch add a cached pool >> in system heap. It has a great improvement of alloc for cached >> buffer. >

[PATCH v2] ION: Sys_heap: Add cached pool to spead up cached buffer alloc

2016-05-18 Thread Chen Feng
zeroed before going to pool v2: Add cached param in pool to distinguish wheather need to flush cache at a fresh alloc. Rework the shrink function. Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Xia Qing <saberlily@hisilicon.com> Reviewed-by: Fu

Re: [RESEND PATCH] ION: Sys_heap: Add cached pool to spead up cached buffer alloc

2016-05-09 Thread Chen Feng
Hi Laura, On 2016/5/10 7:50, Laura Abbott wrote: > On 05/09/2016 01:37 AM, Chen Feng wrote: >> Add ion cached pool in system heap. >> >> Signed-off-by: Chen Feng <puck.c...@hisilicon.com> >> Signed-off-by: Xia Qing <saberlily@hisilicon.com> >>

Re: [RESEND PATCH] ION: Sys_heap: Add cached pool to spead up cached buffer alloc

2016-05-09 Thread Chen Feng
Hi Greg, Please see my v1 version for detail. Thank you. On 2016年05月09日 17:02, Greg KH wrote: > On Mon, May 09, 2016 at 04:37:34PM +0800, Chen Feng wrote: >> Add ion cached pool in system heap. >> >> Signed-off-by: Chen Feng <puck.c...@hisilicon.com> >> Si

[PATCH v1] ION: Sys_heap: Add cached pool to spead up cached buffer alloc

2016-05-09 Thread Chen Feng
Add ion cached pool in system heap. This patch add a cached pool in system heap. It has a great improvement of alloc for cached buffer. v1: Makes the cached buffer zeroed before going to pool Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Xia Qing <saberlily@hisi

[RESEND PATCH] ION: Sys_heap: Add cached pool to spead up cached buffer alloc

2016-05-09 Thread Chen Feng
Add ion cached pool in system heap. Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Xia Qing <saberlily@hisilicon.com> Reviewed-by: Fu Jun <oliver...@hisilicon.com> --- drivers/staging/android/ion/ion_system_heap.c | 145 +-

Re: [PATCH] ION: Sys_heap: Add cached pool to spead up cached buffer alloc

2016-05-09 Thread Chen Feng
Sorry,the order here is not right, please ignore this patch. I will RESEND it. On 2016/5/9 14:24, Chen Feng wrote: > Add ion cached pool in system heap. > > Signed-off-by: Chen Feng <puck.c...@hisilicon.com> > Signed-off-by: Xia Qing <saberlily@hisilicon.com>

[PATCH] ION: Sys_heap: Add cached pool to spead up cached buffer alloc

2016-05-09 Thread Chen Feng
Add ion cached pool in system heap. Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Xia Qing <saberlily@hisilicon.com> --- drivers/staging/android/ion/ion_system_heap.c | 120 +- 1 file changed, 79 insertions(+), 41 deletions(-)

[PATCH] ION: Sys_heap: Makes ion buffer always alloc from page pool

2016-05-04 Thread Chen Feng
Makes the ion buffer always alloced from page pool, no matter it's cached or not. In this way, it can improve the efficiency of it. Currently, there is no difference from cached or non-cached buffer for the page pool. Signed-off-by: Chen Feng <puck.c...@hisilicon.com> --- drivers/s

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

2016-03-13 Thread Chen Feng
Hi greg, On 2016/3/12 1:12, Greg KH wrote: > On Fri, Mar 11, 2016 at 05:05:45PM +0800, Chen Feng wrote: >> >> >> On 2016/3/11 15:30, yalin wang wrote: >>> >>>> On Mar 11, 2016, at 15:23, Lu Bing <albert.lub...@hisilicon.com> wrote: >&g

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

2016-03-11 Thread Chen Feng
" in tasksize. >> Refer oom_kill.c,we add pte also. >> >> Reviewed-by: Chen Feng <puck.c...@hisilicon.com> >> Reviewed-by: Fu Jun <oliver...@hisilicon.com> >> Reviewed-by: Xu YiPing <xuyip...@hisilicon.com> >> Reviewed-by: Yu DongBin <yu

Re: [PATCH v3] android: binder: Sanity check at binder ioctl

2016-02-02 Thread Chen Feng
Add android kernel team. On 2016/2/1 14:04, Chen Feng wrote: > Sanity check at binder ioctl function, > Only allow the shared mm_struct to use the same binder-object > to do binder operate. > > And add proc->vma_vm_mm = current->mm at the open function. > The libbin

[PATCH v3] android: binder: Sanity check at binder ioctl

2016-01-31 Thread Chen Feng
dition to proc->vma_vm_mm Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Wei Dong <weido...@hisilicon.com> Signed-off-by: Junmin Zhao <zhaojun...@huawei.com> Reviewed-by: Zhuangluan Su <suzhuangl...@hisilicon.com> --- drivers/android/binder.c | 5 + 1 fi

[PATCH v2] android: binder: Sanity check at binder ioctl

2016-01-19 Thread Chen Feng
->tsk->mm. If the thread exit the tsk->mm will be NULL. proc->tsk->mm != current->mm && proc->tsk->mm So only allow the shared mm_struct to use the same binder-object and check the existence of mm_struct. V2: Fix compile error for error commit Signed-off-by: Ch

[PATCH] android: binder: Sanity check at binder ioctl

2016-01-18 Thread Chen Feng
->tsk->mm. If the thread exit the tsk->mm will be NULL. proc->tsk->mm != current->tsk->mm && proc->tsk->mm So only allow the shared mm_struct to use the same binder-object and check the existence of mm_struct. Signed-off-by: Chen Feng <puck.c...@hisilico

[PATCH] staging: ion : Donnot wakeup kswapd in ion system alloc

2016-01-14 Thread Chen Feng
pgsteal_kswapd_normal 7071043 pgscan_kswapd_dma 10428250 pgscan_kswapd_normal 37840094 With this change the reclaim ratio has greatly improved 18.9% -> 72.5% Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Lu bing <albert.lub...@hisilicon.com> --- drivers/stag

[PATCH] staging: ion: make the pte default none PTE_RDONLY

2016-01-14 Thread Chen Feng
~PTE_RDONLY; else pte_val(pte) |= PTE_RDONLY; So with the dirty bit,it can improve the efficiency and donnot need to handle memory fault when use access. Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Wei Dong <weido...@hi

[PATCH] staging: ion : Donnot wakeup kswapd in ion system alloc

2016-01-12 Thread Chen Feng
pgsteal_kswapd_normal 7071043 pgscan_kswapd_dma 10428250 pgscan_kswapd_normal 37840094 With this change the reclaim ratio has greatly improved 18.9% -> 72.5% Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Lu bing <albert.lub...@hisilicon.com> --- drivers/stag

[PATCH V1 2/3] taging: android: ion: Add ion driver for Hi6220 SoC platform

2015-10-10 Thread Chen Feng
Add ion support for hi6220 SoC platform. Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Yu Dongbin <yudong...@hisilicon.com> --- drivers/staging/android/ion/Kconfig| 7 + drivers/staging/android/ion/Makefile | 1 + drivers/staging

[PATCH V1 3/3] arm64: dts: Add dts files to enable ION on Hi6220 SoC.

2015-10-10 Thread Chen Feng
Add ION node to enable ION on hi6220 SoC platform Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Yu Dongbin <yudong...@hisilicon.com> --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + arch/arm64/boot/dts/hisilicon/hi6220-ion.dtsi | 20 +

[PATCH V1 1/3] docs: dts: Add documentation for hi6220 SoC ION node

2015-10-10 Thread Chen Feng
Documentation for hi6220 SoC ION node Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Yu Dongbin <yudong...@hisilicon.com> --- .../devicetree/bindings/staging/ion/hi6220-ion.txt | 31 ++ 1 file changed, 31 insertions(+) create mode 100644 D

[PATCH 2/3] staging: android: ion: Add ion driver for Hi6220 SoC platform

2015-10-08 Thread Chen Feng
Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Yu Dongbin <yudong...@hisilicon.com> --- drivers/staging/android/ion/Kconfig| 7 + drivers/staging/android/ion/Makefile | 1 + drivers/staging/android/ion/hisilicon/Kconfig |

[PATCH 3/3] arm64: dts: Add dts files to enable ION on Hi6220 SoC.

2015-10-08 Thread Chen Feng
Add ION node to enable ION on hi6220 SoC platform Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Yu Dongbin <yudong...@hisilicon.com> --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + arch/arm64/boot/dts/hisilicon/hi6220-ion.dtsi | 23

[PATCH 1/3] docs: dts: Add documentation for hi6220 SoC ION node

2015-10-08 Thread Chen Feng
Documentation for hi6220 SoC ION node Signed-off-by: Chen Feng <puck.c...@hisilicon.com> Signed-off-by: Yu Dongbin <yudong...@hisilicon.com> --- .../devicetree/bindings/staging/ion/hi6220-ion.txt | 27 ++ 1 file changed, 27 insertions(+) create mode 100644 D