Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ba2ada0 authored by Tim Murray's avatar Tim Murray Committed by Dmitry Shmidt
Browse files

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: default avatarTim Murray <timmurray@google.com>
parent 9a83b815
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)