Message ID | 20170220021257.26959-2-bsingharora@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
diff --git a/arch/powerpc/include/asm/book3s/64/pgalloc.h b/arch/powerpc/include/asm/book3s/64/pgalloc.h index d0a9ca6..9207213 100644 --- a/arch/powerpc/include/asm/book3s/64/pgalloc.h +++ b/arch/powerpc/include/asm/book3s/64/pgalloc.h @@ -52,7 +52,9 @@ extern void __tlb_remove_table(void *_table); static inline gfp_t pgtable_get_gfp_flags(struct mm_struct *mm, gfp_t gfp) { - return gfp; + if (mm == &init_mm) + return gfp; + return gfp | __GFP_ACCOUNT; } static inline pgd_t *radix__pgd_alloc(struct mm_struct *mm)
Enabled __GFP_ACCOUNT in pgtable_get_gfp_flags(). This allows accounting of page table allocation via kmem to the correct cgroup. Basic testing was done to see if the accounting reflects in 1. perf record tracing 2. memory.kmem.slabinfo Signed-off-by: Balbir Singh <bsingharora@gmail.com> --- arch/powerpc/include/asm/book3s/64/pgalloc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)