Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1423386
| From | "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCHv9-rebased2 21/37] vmscan: split file huge pages before paging them out |
| Date | 2016-06-15 22:20 +0200 |
| Message-ID | <rKps6-77R-19@gated-at.bofh.it> (permalink) |
| References | <rH3o5-5Yv-3@gated-at.bofh.it> <rKpip-74l-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
mm/vmscan.c | 6 ++++++
1 file changed, 6 insertions(+)
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,
/* 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.
--
2.8.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv9-rebased2 00/37] THP-enabled tmpfs/shmem using compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 05/37] khugepaged: recheck pmd after mmap_sem re-acquired "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
Re: [PATCHv9-rebased2 05/37] khugepaged: recheck pmd after mmap_sem re-acquired Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-16 13:50 +0200
Re: [PATCHv9-rebased2 05/37] khugepaged: recheck pmd after mmap_sem re-acquired "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-06-16 14:00 +0200
[PATCHv9-rebased2 12/37] thp, vmstats: add counters for huge file pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 17/37] thp: prepare change_huge_pmd() for file thp "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 09/37] mm: postpone page table allocation until we have page to map "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 18/37] thp: run vma_adjust_trans_huge() outside i_mmap_rwsem "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 21/37] vmscan: split file huge pages before paging them out "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 13/37] thp: support file pages in zap_huge_pmd() "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 29/37] shmem: add huge pages support "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 06/37] thp, mlock: update unevictable-lru.txt "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 19/37] thp: file pages support for split_huge_page() "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 28/37] shmem: get_unmapped_area align huge page "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 07/37] mm: do not pass mm_struct into handle_mm_fault "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 34/37] khugepaged: add support of collapse for tmpfs/shmem pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 14/37] thp: handle file pages in split_huge_pmd() "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 11/37] mm: introduce do_set_pmd() "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 26/37] mm, rmap: account shmem thp pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 25/37] truncate: handle file thp "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 24/37] filemap: prepare find and delete operations for huge pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 22/37] page-flags: relax policy for PG_mappedtodisk and PG_reclaim "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 27/37] shmem: prepare huge= mount option and sysfs knob "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 10/37] rmap: support file thp "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:20 +0200
[PATCHv9-rebased2 04/37] mm-thp-make-swapin-readahead-under-down_read-of-mmap_sem-fix-2-fix "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:30 +0200
csiph-web