linux/arch/powerpc/include/asm/nohash/64
Balbir Singh de3b87611d powerpc/mm/book(e)(3s)/64: Add page table accounting
Introduce a helper pgtable_gfp_flags() which
just returns the current gfp flags and adds
__GFP_ACCOUNT to account for page table allocation.
The generic helper is added to include/asm/pgalloc.h
and has two variants - WARNING ugly bits ahead

1. If the header is included from a module, no check
for mm == &init_mm is done, since init_mm is not
exported
2. For kernel includes, the check is done and required
see (3e79ec7 arch: x86: charge page tables to kmemcg)

The fundamental assumption is that no module should be
doing pgd/pud/pmd and pte alloc's on behalf of init_mm
directly.

NOTE: This adds an overhead to pmd/pud/pgd allocations
similar to x86.  The other alternative was to implement
pmd_alloc_kernel/pud_alloc_kernel and pgd_alloc_kernel
with their offset variants.

For 4k page size, pte_alloc_one no longer calls
pte_alloc_one_kernel.

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-06-05 19:03:10 +10:00
..
pgalloc.h powerpc/mm/book(e)(3s)/64: Add page table accounting 2017-06-05 19:03:10 +10:00
pgtable-4k.h arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
pgtable-64k.h arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
pgtable.h powerpc/mm/nohash: MM_SLICE is only used by book3s 64 2017-03-31 23:09:47 +11:00