linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] mm: Generalize page table allocation helpers
@ 2026-10-14  3:59 Muchun Song
  2026-10-14  3:59 ` [PATCH 1/3] mm: generalize kernel PTE table allocation Muchun Song
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Muchun Song @ 2026-10-14  3:59 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand
  Cc: Muchun Song, Muchun Song, Arnd Bergmann,
	Mike Rapoport (Microsoft), Huacai Chen, WANG Xuerui,
	Thomas Bogendoerfer, James E.J. Bottomley, Helge Deller, linux-mm,
	linux-arch, loongarch, linux-mips, linux-parisc, linux-kernel

A subsequent series will switch runtime vmemmap population to the
generic page-table allocators. Since vmemmap tables belong to init_mm,
the allocators must select GFP_PGTABLE_KERNEL and mark the ptdesc as a
kernel page table.

Some architecture-specific allocators do not preserve both semantics.
LoongArch and MIPS choose PMD/PUD GFP flags without checking the mm,
which can charge kernel PMD tables to a memcg and leave user PUD tables
unaccounted. The private PMD/PUD allocators also omit kernel ptdesc
marking.

Rather than duplicate this handling in each architecture, extend the
generic PTE, PMD and PUD allocators to support architecture
initialization hooks and non-zero table orders. LoongArch, MIPS and
parisc can then drop their private allocators and inherit the generic
GFP selection and ptdesc handling.

This series only prepares the allocation interfaces; the runtime
vmemmap conversion will be submitted separately.

Muchun Song (3):
  mm: generalize kernel PTE table allocation
  mm: generalize PMD page table allocation
  mm: generalize PUD page table allocation

 arch/loongarch/include/asm/pgalloc.h | 48 ----------------------------
 arch/mips/include/asm/pgalloc.h      | 40 -----------------------
 arch/parisc/include/asm/pgalloc.h    | 17 ----------
 include/asm-generic/pgalloc.h        | 29 ++++++++++++++---
 4 files changed, 24 insertions(+), 110 deletions(-)


base-commit: ad9f2d463666c64e94b04be5263c9bf8f9f96fb7
-- 
2.54.0



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

end of thread, other threads:[~2026-10-15  8:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14  3:59 [PATCH 0/3] mm: Generalize page table allocation helpers Muchun Song
2026-10-14  3:59 ` [PATCH 1/3] mm: generalize kernel PTE table allocation Muchun Song
2026-10-14  3:59 ` [PATCH 2/3] mm: generalize PMD page " Muchun Song
2026-10-14  3:59 ` [PATCH 3/3] mm: generalize PUD " Muchun Song
2026-10-15  8:33 ` [PATCH 0/3] mm: Generalize page table allocation helpers Mike Rapoport

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).