From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763127AbcALREs (ORCPT ); Tue, 12 Jan 2016 12:04:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55539 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763111AbcALREr (ORCPT ); Tue, 12 Jan 2016 12:04:47 -0500 Subject: Re: [PATCH] staging: ion : Donnot wakeup kswapd in ion system alloc To: Chen Feng , gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com, broonie@kernel.org, robh+dt@kernel.org, haojian.zhuang@linaro.org, yudongbin@hisilicon.com, saberlily.xia@hisilicon.com, suzhuangluan@hisilicon.com, kong.kongxinwei@hisilicon.com, xuyiping@hisilicon.com, z.liuxinliang@hisilicon.com, weidong2@hisilicon.com, w.f@huawei.com, puck.chen@foxmail.com, shimingxing@hisilicon.com, oliver.fu@hisilicon.com, albert.lubing@hisilicon.com, chenxiang9@huawei.com, liuzixing@huawei.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <1452597265-78388-1-git-send-email-puck.chen@hisilicon.com> Cc: qijiwen@hisilicon.com, peter.panshilin@hisilicon.com, dan.zhao@hisilicon.com, linuxarm@huawei.com, dev@lists.96boards.org From: Laura Abbott Message-ID: <56953228.4080601@redhat.com> Date: Tue, 12 Jan 2016 09:04:40 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1452597265-78388-1-git-send-email-puck.chen@hisilicon.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/12/2016 03:14 AM, Chen Feng wrote: > Since ion alloc can be called by userspace,eg gralloc. > When it is called frequently, the efficiency of kswapd is > to low. And the reclaimed memory is too lower. In this way, > the kswapd can use to much cpu resources. > > With 3.5GB DMA Zone and 0.5 Normal Zone. > > pgsteal_kswapd_dma 9364140 > 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 > Signed-off-by: Lu bing > --- > drivers/staging/android/ion/ion_system_heap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c > index d4c3e55..b69dfc7 100644 > --- a/drivers/staging/android/ion/ion_system_heap.c > +++ b/drivers/staging/android/ion/ion_system_heap.c > @@ -27,7 +27,7 @@ > #include "ion_priv.h" > > static gfp_t high_order_gfp_flags = (GFP_HIGHUSER | __GFP_ZERO | __GFP_NOWARN | > - __GFP_NORETRY) & ~__GFP_DIRECT_RECLAIM; > + __GFP_NORETRY) & ~__GFP_RECLAIM; > static gfp_t low_order_gfp_flags = (GFP_HIGHUSER | __GFP_ZERO | __GFP_NOWARN); > static const unsigned int orders[] = {8, 4, 0}; > static const int num_orders = ARRAY_SIZE(orders); > Makes sense given what the code is actually trying to do and the data presented here. Reviewed-by: Laura Abbott