From: Tim Murray Date: Fri, 2 Sep 2016 23:04:41 +0000 (-0700) Subject: ANDROID: lowmemorykiller: account for unevictable pages X-Git-Tag: release-20171130_firefly~4^2~100^2~103 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e4dcebb12e9be15c69b5977a36466dccd11f4f87;p=firefly-linux-kernel-4.4.55.git ANDROID: lowmemorykiller: account for unevictable pages lowmemorykiller was not taking into account unevictable pages when deciding what level to kill. If significant amounts of memory were pinned, this caused lowmemorykiller to effectively stop at a much higher level than it should. bug 31255977 Change-Id: I763ecbfef8c56d65bb8f6147ae810692bd81b6e2 Signed-off-by: Tim Murray --- diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index af49af0cca01..606d13a1ea74 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -94,6 +94,7 @@ static unsigned long lowmem_scan(struct shrinker *s, struct shrink_control *sc) int other_free = global_page_state(NR_FREE_PAGES) - totalreserve_pages; int other_file = global_page_state(NR_FILE_PAGES) - global_page_state(NR_SHMEM) - + global_page_state(NR_UNEVICTABLE) - total_swapcache_pages(); if (lowmem_adj_size < array_size)