linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] arm64/mm: Enable accounting for page table pages
@ 2019-01-24  5:20 Anshuman Khandual
  2019-01-24  5:20 ` [PATCH 1/6] KVM: ARM: Remove pgtable standard functions from stage-2 page tables Anshuman Khandual
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Anshuman Khandual @ 2019-01-24  5:20 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: mark.rutland, suzuki.poulose, marc.zyngier, Catalin.Marinas,
	Steve.Capper, will.deacon, james.morse

Currently page table page allocation and release has multiple combinations
for user space and kernel mapping page tables. Not only this is vulnerable
for bad page state errors it also prevents accurate accounting for those
pages through NR_PAGETABLE. This patch series attempts to standardize all
(except PGD slab cache 'pdg_cache') page table page allocation and release
through pte_alloc_one()/pte_free() which in turn guarantees that all these
pages will go trough pgtable_page_[ctor|dtor] constructs. It also takes
care of some of the pages who might have been allocated early via memblock.

This enables memcg based accounting for user process page table pages via
__GFP_ACCOUNT. For now this also removes standard ptable page allocators
usage from KVM stage-2 as some of them use multi order allocation which is
not supported in a generic way.

Anshuman Khandual (6):
  KVM: ARM: Remove pgtable standard functions from stage-2 page tables
  arm64/mm: Ensure PGD kmem cache object is actually allocated
  arm64/mm: Make pgd_pgtable_alloc() call pte_alloc_one() always
  arm64/mm: Make all page table pages cycles through standard constructs
  arm64/mm: Call pgtable_page_dtor() for both PMD and PUD page table pages
  arm64/mm: Enable page table page accounting for user space

 arch/arm/include/asm/stage2_pgtable.h   |  4 +--
 arch/arm64/include/asm/pgalloc.h        | 54 +++++++++++++++++++++++++++------
 arch/arm64/include/asm/stage2_pgtable.h |  4 +--
 arch/arm64/include/asm/tlb.h            |  2 ++
 arch/arm64/mm/mmu.c                     | 17 ++++++++---
 arch/arm64/mm/pgd.c                     |  5 +--
 6 files changed, 67 insertions(+), 19 deletions(-)

-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-02-19  4:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24  5:20 [PATCH 0/6] arm64/mm: Enable accounting for page table pages Anshuman Khandual
2019-01-24  5:20 ` [PATCH 1/6] KVM: ARM: Remove pgtable standard functions from stage-2 page tables Anshuman Khandual
2019-01-24  5:20 ` [PATCH 2/6] arm64/mm: Ensure PGD kmem cache object is actually allocated Anshuman Khandual
2019-01-24 15:16   ` Catalin Marinas
2019-01-25  4:59     ` Anshuman Khandual
2019-01-24  5:20 ` [PATCH 3/6] arm64/mm: Make pgd_pgtable_alloc() call pte_alloc_one() always Anshuman Khandual
2019-02-14 17:11   ` Will Deacon
2019-02-19  4:33     ` Anshuman Khandual
2019-01-24  5:20 ` [PATCH 4/6] arm64/mm: Make all page table pages cycles through standard constructs Anshuman Khandual
2019-01-24  5:20 ` [PATCH 5/6] arm64/mm: Call pgtable_page_dtor() for both PMD and PUD page table pages Anshuman Khandual
2019-02-14 17:11   ` Will Deacon
2019-02-19  4:34     ` Anshuman Khandual
2019-01-24  5:20 ` [PATCH 6/6] arm64/mm: Enable page table page accounting for user space Anshuman Khandual
2019-02-14 17:11   ` Will Deacon
2019-02-19  4:49     ` Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).