linuxppc / issues

Issues repository for linuxppc
5 stars 0 forks source link

Get rid of HUGEPD #483

Closed chleroy closed 6 days ago

chleroy commented 4 months ago

HUGEPD is a specific powerpc method to handle huge pages that don't fit as a leaf-entry in regular (PGD/P4D/PUD/PMD) directories.

HUGEPD is not well supported by mm core, there are walkers that ignores it (ex: perf_get_pgtable_size() ).

Other architectures like ARM64 use other technics called cont-PTE / cont-PxD. Today powerpc/8xx uses something similar already for 16k and 512k hugepages. That means duplicating a PTE as appropriate level so that a standard pagetable walk not knowing the page is a hugepage will always hit a copy of the PTE.

There is some ongoing work on ARM64 to make cont-PxD generic and to enable transparent hugepages on cont-PxD hugepages. powerpc could take benefit of that if it gets rid of HUGEPD. Series available at https://patchwork.ozlabs.org/project/linuxppc-dev/cover/20240215103205.2607016-1-ryan.roberts@arm.com/

A first series to reimplement hugepages on powerpc using cont-PxD instead of HUGEPD is available here: https://patchwork.ozlabs.org/project/linuxppc-dev/cover/cover.1715971869.git.christophe.leroy@csgroup.eu/

mpe commented 4 months ago

Also worth mentioning that hugepd is seen as an impediment by generic mm developers https://lwn.net/Articles/974491/

chleroy commented 6 days ago

hugepd is gone, see commit https://github.com/torvalds/linux/commit/8268614b408be6b76c1cee6f67de7deb0d6593b3