* [merged] thp-handle-file-pages-in-split_huge_pmd.patch removed from -mm tree
@ 2016-07-27 19:02 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-07-27 19:02 UTC (permalink / raw)
To: kirill.shutemov, mm-commits
The patch titled
Subject: thp: handle file pages in split_huge_pmd()
has been removed from the -mm tree. Its filename was
thp-handle-file-pages-in-split_huge_pmd.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: thp: handle file pages in split_huge_pmd()
Splitting THP PMD is simple: just unmap it as in DAX case. This way we
can avoid memory overhead on page table allocation to deposit.
It's probably a good idea to try to allocation page table with
GFP_ATOMIC in __split_huge_pmd_locked() to avoid refaulting the area,
but clearing pmd should be good enough for now.
Unlike DAX, we also remove the page from rmap and drop reference.
pmd_young() is transfered to PageReferenced().
Link: http://lkml.kernel.org/r/1466021202-61880-15-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>
---
mm/huge_memory.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff -puN mm/huge_memory.c~thp-handle-file-pages-in-split_huge_pmd mm/huge_memory.c
--- a/mm/huge_memory.c~thp-handle-file-pages-in-split_huge_pmd
+++ a/mm/huge_memory.c
@@ -2987,10 +2987,18 @@ static void __split_huge_pmd_locked(stru
count_vm_event(THP_SPLIT_PMD);
- if (vma_is_dax(vma)) {
- pmd_t _pmd = pmdp_huge_clear_flush_notify(vma, haddr, pmd);
+ if (!vma_is_anonymous(vma)) {
+ _pmd = pmdp_huge_clear_flush_notify(vma, haddr, pmd);
if (is_huge_zero_pmd(_pmd))
put_huge_zero_page();
+ if (vma_is_dax(vma))
+ return;
+ page = pmd_page(_pmd);
+ if (!PageReferenced(page) && pmd_young(_pmd))
+ SetPageReferenced(page);
+ page_remove_rmap(page, true);
+ put_page(page);
+ add_mm_counter(mm, MM_FILEPAGES, -HPAGE_PMD_NR);
return;
} else if (is_huge_zero_pmd(*pmd)) {
return __split_huge_zero_page_pmd(vma, haddr, pmd);
_
Patches currently in -mm which might be from kirill.shutemov@linux.intel.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-27 19:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-27 19:02 [merged] thp-handle-file-pages-in-split_huge_pmd.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).