From 13e4f13fdea9d86e86d779f0a766e92f48f69f00 Mon Sep 17 00:00:00 2001 From: Chen Feng Date: Fri, 15 Jan 2016 10:38:19 +0800 Subject: [PATCH] staging: ion : Donnot wakeup kswapd in ion system alloc 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% Change-Id: I20ea0e4ad0537f6e90efbc59fb8d56d691ee3bde Signed-off-by: Chen Feng Signed-off-by: Lu bing Reviewed-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman Git-commit: 2ef230531ee171a475fc3ddad5516dd7e09a8a77 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git [vinmenon@codeaurora.org: Resolved minor merge conflicts] Signed-off-by: Vinayak Menon --- 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 b34b44fc4d2f..487dc37cde27 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -33,7 +33,7 @@ static gfp_t high_order_gfp_flags = (GFP_HIGHUSER | __GFP_NOWARN | __GFP_NORETRY) - & ~__GFP_DIRECT_RECLAIM; + & ~__GFP_RECLAIM; static gfp_t low_order_gfp_flags = (GFP_HIGHUSER | __GFP_NOWARN); #ifndef CONFIG_ALLOC_BUFFERS_IN_4K_CHUNKS