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

Commit dc41a1c6 authored by Susheel Khiani's avatar Susheel Khiani
Browse files

Revert "lowmemorykiller: Don't count reserve page twice"



This reverts commit d73f05ce.

The patch is causing device crash while running
kernel tests on mainline. The change was to
make LMK less aggressive.

Change-Id: I272bf5ccd54a29de1c770d69af7fea2963f46333
Signed-off-by: default avatarSusheel Khiani <skhiani@codeaurora.org>
parent 280a0ea3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include <linux/mm.h>
#include <linux/oom.h>
#include <linux/sched.h>
#include <linux/swap.h>
#include <linux/rcupdate.h>
#include <linux/notifier.h>
#include <linux/mutex.h>
@@ -280,7 +281,7 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
			return 0;
	}

	other_free = global_page_state(NR_FREE_PAGES);
	other_free = global_page_state(NR_FREE_PAGES) - totalreserve_pages;

	if (global_page_state(NR_SHMEM) + total_swapcache_pages() <
		global_page_state(NR_FILE_PAGES))