]> Git Repo - linux.git/commit
mm: thp: kill __transhuge_page_enabled()
authorYang Shi <[email protected]>
Thu, 16 Jun 2022 17:48:38 +0000 (10:48 -0700)
committerakpm <[email protected]>
Mon, 18 Jul 2022 00:14:33 +0000 (17:14 -0700)
commit7da4e2cb8b1ff8221759bfc7512d651ee69516dc
tree04213a6446ef38e2eff972db3754bd9bc21b935c
parent9fec51689ff60d9766b38051a0b1692f93d95364
mm: thp: kill __transhuge_page_enabled()

The page fault path checks THP eligibility with __transhuge_page_enabled()
which does the similar thing as hugepage_vma_check(), so use
hugepage_vma_check() instead.

However page fault allows DAX and !anon_vma cases, so added a new flag,
in_pf, to hugepage_vma_check() to make page fault work correctly.

The in_pf flag is also used to skip shmem and file THP for page fault
since shmem handles THP in its own shmem_fault() and file THP allocation
on fault is not supported yet.

Also remove hugepage_vma_enabled() since hugepage_vma_check() is the only
caller now, it is not necessary to have a helper function.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yang Shi <[email protected]>
Reviewed-by: Zach O'Keefe <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Miaohe Lin <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
fs/proc/task_mmu.c
include/linux/huge_mm.h
mm/huge_memory.c
mm/khugepaged.c
mm/memory.c
This page took 0.058367 seconds and 4 git commands to generate.