Re: [PATCH 6/8] mm: lru_deactivate_fn should clear PG_referenced

From
Michal Hocko <hidden>
Date
2015-10-30 12:47:16
Also in
linux-mm, lkml
Reply to
Minchan Kim, 2015-10-30
On Fri 30-10-15 16:01:42, Minchan Kim wrote:
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.
I might be missing something but aren't we using PG_referenced only for
pagecache (and shmem) pages?
quoted hunk ↗ jump to hunk
Acked-by: Hugh Dickins <redacted>
Suggested-by: Andrew Morton <redacted>
Signed-off-by: Minchan Kim <redacted>
---
 mm/swap.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/mm/swap.c b/mm/swap.c
index d0eacc5f62a3..4a6aec976ab1 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -810,6 +810,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);
-- 
1.9.1
-- 
Michal Hocko
SUSE Labs
Thread (38 messages) 38 messages, 8 authors, last reply 2015-11-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help