summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2016-09-02 16:04:41 -0700
committerDmitry Shmidt <dimitrysh@google.com>2017-05-16 21:55:01 +0000
commit2ba2ada07d6ffeb25a9dd0d25cc334574bbaaed1 (patch)
tree6b1adba480e0a9f58bc6e3f0f3467a02b34d2e80
parent9a83b8157a75b297e3a5f105bf209a44184ca52d (diff)
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 <timmurray@google.com>
-rw-r--r--drivers/staging/android/lowmemorykiller.c1
1 files changed, 1 insertions, 0 deletions
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)