• Yang Shi's avatar
    mm: thp: kill transparent_hugepage_active() · 9fec5168
    Yang Shi authored
    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.comSigned-off-by: default avatarYang Shi <shy828301@gmail.com>
    Reviewed-by: default avatarZach 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    9fec5168
task_mmu.c 48.4 KB