• Andrew Morton's avatar
    [PATCH] Optimise follow_page() for page-table-based hugepages · 1f1921fc
    Andrew Morton authored
    ia32 and others can determine a page's hugeness by inspecting the pmd's value
    directly.  No need to perform a VMA lookup against the user's virtual
    address.
    
    This patch ifdef's away the VMA-based implementation of
    hugepage-aware-follow_page for ia32 and replaces it with a pmd-based
    implementation.
    
    The intent is that architectures will implement one or the other.  So the architecture either:
    
    1: Implements hugepage_vma()/follow_huge_addr(), and stubs out
       pmd_huge()/follow_huge_pmd() or
    
    2: Implements pmd_huge()/follow_huge_pmd(), and stubs out
       hugepage_vma()/follow_huge_addr()
    1f1921fc
hugetlbpage.c 10.1 KB