Skip to contentSkip to conversation

vmscan: split file huge pages before paging them out

PATCH New [email protected] 1 participant 1 message Jul 26, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 102/126 vmscan: split file huge pages before paging them out

From: "Kirill A. Shutemov" <[email protected]>
Subject: 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.

---

 mm/vmscan.c |    6 ++++++
 1 file changed, 6 insertions(+)
mm/vmscan.c renamed from mm/vmscan.c~vmscan-split-file-huge-pages-before-paging-them-out +6 -0
diff -puN mm/vmscan.c~vmscan-split-file-huge-pages-before-paging-them-out mm/vmscan.c
@@ -1055,8 +1055,14 @@ static unsigned long shrink_page_list(st
 
 			/* 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.

_