]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: lru_deactivate_fn should clear PG_referenced
authorMinchan Kim <minchan@kernel.org>
Wed, 21 Oct 2015 22:03:48 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:48 +0000 (09:03 +1100)
deactivate_page aims for accelerate for reclaiming through
moving pages from active list to inactive list so we should
clear PG_referenced for the goal.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swap.c

index 7877fbaed809927aca3682f550fd28e69bc6297f..674e2c93da4e958780abf8b4c6de11c8407ef25e 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -565,6 +565,7 @@ static void lru_deactivate_fn(struct page *page, struct lruvec *lruvec,
 
                del_page_from_lru_list(page, lruvec, lru + LRU_ACTIVE);
                ClearPageActive(page);
+               ClearPageReferenced(page);
                add_page_to_lru_list(page, lruvec, lru);
 
                __count_vm_event(PGDEACTIVATE);