• David Gibson's avatar
    [PATCH] powerpc: Fix pagetable bloat for hugepages · f10a04c0
    David Gibson authored
    At present, ARCH=powerpc kernels can waste considerable space in
    pagetables when making large hugepage mappings.  Hugepage PTEs go in
    PMD pages, but each PMD page maps 256M and so contains only 16
    hugepage PTEs (128 bytes of data), but takes up a 1024 byte
    allocation.  With CONFIG_PPC_64K_PAGES enabled (64k base page size),
    the situation is worse.  Now hugepage PTEs are at the PTE page level
    (also mapping 256M), so we store 16 hugepage PTEs in a 64k allocation.
    
    The PowerPC MMU already means that any 256M region is either all
    hugepage, or all normal pages.  Thus, with some care, we can use a
    different allocation for the hugepage PTE tables and only allocate the
    128 bytes necessary.
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    f10a04c0
page_64.h 5.18 KB