]> git.baikalelectronics.ru Git - kernel.git/commit
mm: thp: kill transparent_hugepage_active()
authorYang Shi <shy828301@gmail.com>
Thu, 16 Jun 2022 17:48:37 +0000 (10:48 -0700)
committerakpm <akpm@linux-foundation.org>
Mon, 18 Jul 2022 00:14:33 +0000 (17:14 -0700)
commit1f1a55d3e5f83c4c9d6d0b124464b4448e5ae9b4
tree3a49d1f60fa549d41904e4be210d351391d56502
parent2c79707fe70ca53061a06246112e45163629a075
mm: thp: kill transparent_hugepage_active()

The transparent_hugepage_active() was introduced to show THP eligibility
bit in smaps in proc, smaps is the only user.  But it actually does the
similar check as hugepage_vma_check() which is used by khugepaged.  We
definitely don't have to maintain two similar checks, so kill
transparent_hugepage_active().

This patch also fixed the wrong behavior for VM_NO_KHUGEPAGED vmas.

Also move hugepage_vma_check() to huge_memory.c and huge_mm.h since it
is not only for khugepaged anymore.

[akpm@linux-foundation.org: check vma->vm_mm, per Zach]
[akpm@linux-foundation.org: add comment to vdso check]
Link: https://lkml.kernel.org/r/20220616174840.1202070-5-shy828301@gmail.com
Signed-off-by: Yang Shi <shy828301@gmail.com>
Reviewed-by: Zach O'Keefe <zokeefe@google.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/task_mmu.c
include/linux/huge_mm.h
include/linux/khugepaged.h
mm/huge_memory.c
mm/khugepaged.c