Commit 7751b2da authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds

vmscan: split file huge pages before paging them out

This is preparation of vmscan for file huge pages.  We cannot write out
huge pages, so we need to split them on the way out.

Link: default avatarKirill A. Shutemov <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 9a73f61b
......@@ -1055,8 +1055,14 @@ static unsigned long shrink_page_list(struct list_head *page_list,
/* Adding to swap updated mapping */
mapping = page_mapping(page);
} else if (unlikely(PageTransHuge(page))) {
/* Split file THP */
if (split_huge_page_to_list(page, page_list))
goto keep_locked;
VM_BUG_ON_PAGE(PageTransHuge(page), page);
* The page is mapped into the page tables of one or more
* processes. Try to unmap it here.
Markdown is supported
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