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

Commit a99886e7 authored by Naitik Bharadiya's avatar Naitik Bharadiya
Browse files

android: lowmemorykiller: consider unevictable pages



Due to not considering unevictable pages, vmpressure < 95 is
getting ignored.This builds up the reclaim pressure causing
direct reclaims, that in turn results in vmpressure 100
causing a series of kills so, consider unevictable pages
in vmpressure notifier to avoid lowmemorykiller trigger.

Change-Id: Ic26dc76b92b4bbc885c3f40c85f3d6f03a7696e9
Signed-off-by: default avatarNaitik Bharadiya <bharad@codeaurora.org>
parent 0f793d31
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -294,6 +294,7 @@ static int lmk_vmpressure_notifier(struct notifier_block *nb,
	if (pressure >= 95) {
		other_file = global_page_state(NR_FILE_PAGES) + zcache_pages() -
			global_page_state(NR_SHMEM) -
			global_page_state(NR_UNEVICTABLE) -
			total_swapcache_pages();
		other_free = global_page_state(NR_FREE_PAGES);

@@ -307,6 +308,7 @@ static int lmk_vmpressure_notifier(struct notifier_block *nb,

		other_file = global_page_state(NR_FILE_PAGES) + zcache_pages() -
			global_page_state(NR_SHMEM) -
			global_page_state(NR_UNEVICTABLE) -
			total_swapcache_pages();

		other_free = global_page_state(NR_FREE_PAGES);
@@ -319,6 +321,7 @@ static int lmk_vmpressure_notifier(struct notifier_block *nb,
	} else if (atomic_read(&shift_adj)) {
		other_file = global_page_state(NR_FILE_PAGES) + zcache_pages() -
			global_page_state(NR_SHMEM) -
			global_page_state(NR_UNEVICTABLE) -
			total_swapcache_pages();
		other_free = global_page_state(NR_FREE_PAGES);