lkml.org 
[lkml]   [2020]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH v2 15/30] mm: thp: add PUD THP to deferred split list when PUD mapping is gone.
Date
From: Zi Yan <ziy@nvidia.com>

When PUD mapping is gone, there is no need to keep the PUD THP. Add it
to deferred split list, so when memory pressure comes, the THP will be
split.

Signed-off-by: Zi Yan <ziy@nvidia.com>
---
mm/rmap.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/mm/rmap.c b/mm/rmap.c
index b4950f7a0978..424322807966 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1329,6 +1329,9 @@ static void page_remove_anon_compound_rmap(struct page *page, int map_order)
}
__dec_node_page_state(page, NR_ANON_THPS);
}
+ /* deferred split huge pud page if PUD map is gone */
+ if (!compound_mapcount(head))
+ deferred_split_huge_page(head);
nr += HPAGE_PMD_NR;
__mod_node_page_state(page_pgdat(head), NR_ANON_MAPPED, -nr);
return;
--
2.28.0
\
 
 \ /
  Last update: 2020-09-28 20:02    [W:0.149 / U:1.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site