hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB1RRY
--------------------------------
Since commit d4148aeab412 ("mm, mmap: limit THP alignment of anonymous mappings to PMD-aligned sizes"), the performance regression introduced by commit df0ad0579ac9 ("mm: align larger anonymous mappings on THP boundaries") disappears, so enable PMD anouymous mapping by default.
Fixes: df0ad0579ac9 ("mm: align larger anonymous mappings on THP boundaries") Signed-off-by: Jinjiang Tu tujinjiang@huawei.com --- mm/huge_memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 599ecf6d265e..a10f3a6349ea 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -66,7 +66,8 @@ unsigned long transparent_hugepage_flags __read_mostly = (1<<TRANSPARENT_HUGEPAGE_DEFRAG_REQ_MADV_FLAG)| (1<<TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG)| (1<<TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG)| - (1<<TRANSPARENT_HUGEPAGE_FILE_MTHP_FLAG); + (1<<TRANSPARENT_HUGEPAGE_FILE_MTHP_FLAG)| + (1<<TRANSPARENT_HUGEPAGE_ANON_MAPPING_PMD_ALIGN_FLAG);
static struct shrinker deferred_split_shrinker;