aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2016-07-26 18:25:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 19:19:19 -0400
commit7751b2da6be0b59da0838a05153a646df1affbce (patch)
tree451727d9d00902b1d91c33449832344435977453 /mm/vmscan.c
parent9a73f61bdb8acdc01bbaf72a3fe0a8854f2463ad (diff)
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: http://lkml.kernel.org/r/1466021202-61880-22-git-send-email-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 93ba33789ac6..21d417ccff69 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1055,8 +1055,14 @@ static unsigned long shrink_page_list(struct list_head *page_list,
1055 1055
1056 /* Adding to swap updated mapping */ 1056 /* Adding to swap updated mapping */
1057 mapping = page_mapping(page); 1057 mapping = page_mapping(page);
1058 } else if (unlikely(PageTransHuge(page))) {
1059 /* Split file THP */
1060 if (split_huge_page_to_list(page, page_list))
1061 goto keep_locked;
1058 } 1062 }
1059 1063
1064 VM_BUG_ON_PAGE(PageTransHuge(page), page);
1065
1060 /* 1066 /*
1061 * The page is mapped into the page tables of one or more 1067 * The page is mapped into the page tables of one or more
1062 * processes. Try to unmap it here. 1068 * processes. Try to unmap it here.