mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
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: aa3fa08df4 ("mem-offline: improve the effective utilization of movable zone")
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
This commit is contained in:
parent
6586778045
commit
3efde2bdaa
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue