Skip to content

Commit

Permalink
vmscan: split file huge pages before paging them out
Browse files Browse the repository at this point in the history
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: http://lkml.kernel.org/r/1466021202-61880-22-git-send-email-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
kiryl authored and torvalds committed Jul 26, 2016
1 parent 9a73f61 commit 7751b2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7751b2d

Please sign in to comment.