From 3efde2bdaa8bf41ce328ee41ba788c9aca813525 Mon Sep 17 00:00:00 2001 From: Charan Teja Reddy Date: Fri, 20 Nov 2020 20:59:38 +0530 Subject: [PATCH] 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: aa3fa08df429 ("mem-offline: improve the effective utilization of movable zone") Signed-off-by: Charan Teja Reddy --- drivers/soc/qcom/mem-offline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soc/qcom/mem-offline.c b/drivers/soc/qcom/mem-offline.c index fec183024481..fa5a912149b7 100644 --- a/drivers/soc/qcom/mem-offline.c +++ b/drivers/soc/qcom/mem-offline.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -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; }