Commit 8940b34a authored by Minchan Kim's avatar Minchan Kim Committed by Linus Torvalds
Browse files


The local variable references in shrink_page_list is PAGEREF_RECLAIM_CLEAN
as default.  It is for preventing to reclaim dirty pages when CMA try to
migrate pages.  Strictly speaking, we don't need it because CMA didn't
allow to write out by .may_writepage = 0 in reclaim_clean_pages_from_list.

Moreover, it has a problem to prevent anonymous pages's swap out even
though force_reclaim = true in shrink_page_list on upcoming patch.  So
this patch makes references's default value to PAGEREF_RECLAIM and rename
force_reclaim with ignore_references to make it more clear.

This is a preparatory work for next patch.


Signed-off-by: default avatarMinchan Kim <>
Acked-by: default avatarMichal Hocko <>
Acked-by: default avatarJohannes Weiner <>
Cc: Chris Zankel <>
Cc: Daniel Colascione <>
Cc: Dave Hansen <>
Cc: Hillf Danton <>
Cc: James E.J. Bottomley <>
Cc: Joel Fernandes (Google) <>
Cc: kbuild test robot <>
Cc: Kirill A. Shutemov <>
Cc: Oleksandr Natalenko <>
Cc: Ralf Baechle <>
Cc: Richard Henderson <>
Cc: Shakeel Butt <>
Cc: Sonny Rao <>
Cc: Suren Baghdasaryan <>
Cc: Tim Murray <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 9c276cc6
......@@ -1123,7 +1123,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
struct scan_control *sc,
enum ttu_flags ttu_flags,
struct reclaim_stat *stat,
bool force_reclaim)
bool ignore_references)
......@@ -1137,7 +1137,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
struct address_space *mapping;
struct page *page;
int may_enter_fs;
enum page_references references = PAGEREF_RECLAIM_CLEAN;
enum page_references references = PAGEREF_RECLAIM;
bool dirty, writeback;
unsigned int nr_pages;
......@@ -1268,7 +1268,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
if (!force_reclaim)
if (!ignore_references)
references = page_check_references(page, sc);
switch (references) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment