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

Commit 3efde2bd authored by Charan Teja Reddy's avatar Charan Teja Reddy Committed by Gerrit - the friendly Code Review server
Browse files

mem-offline: increment the NR_ISOLATED_ANON stat properly



Increment NR_ISOLATED_ANON when isolate a page so that the same is
decremented when the page migration is successful or when adding pages
back to the lru.

Change-Id: I6879c0029342560496b79d649a77283c767ab08e
Fixes: aa3fa08d ("mem-offline: improve the effective utilization of movable zone")
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent 65867780
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
#include <linux/memblock.h>
#include <linux/mmu_context.h>
#include <linux/mmzone.h>
#include <linux/mm_inline.h>
#include <linux/ktime.h>
#include <linux/of.h>
#include <linux/proc_fs.h>
@@ -538,6 +539,8 @@ static unsigned long get_anon_movable_pages(
		ret = isolate_lru_page(page);
		if (!ret) {
			list_add_tail(&page->lru, list);
			inc_node_page_state(page, NR_ISOLATED_ANON +
					page_is_file_cache(page));
			++fc->nr_migrate_pages;
		}