From ef74503ce64f5cdb638c94334c5abd85f8a9a15f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2018 10:11:09 +0200 Subject: [PATCH] 4.4-stable patches added patches: staging-ion-donnot-wakeup-kswapd-in-ion-system-alloc.patch --- queue-4.4/series | 1 + ...ot-wakeup-kswapd-in-ion-system-alloc.patch | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 queue-4.4/staging-ion-donnot-wakeup-kswapd-in-ion-system-alloc.patch diff --git a/queue-4.4/series b/queue-4.4/series index 3a0dc5960ef..07505726c06 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1,3 +1,4 @@ cifs-do-not-allow-creating-sockets-except-with-smb1-posix-exensions.patch x86-tsc-prevent-32bit-truncation-in-calc_hpet_ref.patch perf-return-proper-values-for-user-stack-errors.patch +staging-ion-donnot-wakeup-kswapd-in-ion-system-alloc.patch diff --git a/queue-4.4/staging-ion-donnot-wakeup-kswapd-in-ion-system-alloc.patch b/queue-4.4/staging-ion-donnot-wakeup-kswapd-in-ion-system-alloc.patch new file mode 100644 index 00000000000..708cd4c95b3 --- /dev/null +++ b/queue-4.4/staging-ion-donnot-wakeup-kswapd-in-ion-system-alloc.patch @@ -0,0 +1,45 @@ +From 2ef230531ee171a475fc3ddad5516dd7e09a8a77 Mon Sep 17 00:00:00 2001 +From: Chen Feng +Date: Fri, 15 Jan 2016 10:38:19 +0800 +Subject: staging: ion : Donnot wakeup kswapd in ion system alloc + +From: Chen Feng + +commit 2ef230531ee171a475fc3ddad5516dd7e09a8a77 upstream. + +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 +Reviewed-by: Laura Abbott +Cc: Greg Hackmann +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/android/ion/ion_system_heap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- 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); -- 2.47.3