[RFC PATCH v2 18/20] powerpc/64s: Use contiguous PMD/PUD instead of HUGEPD

2024-05-17 Thread Christophe Leroy
On book3s/64, the only user of hugepd is hash in 4k mode. All other setups (hash-64, radix-4, radix-64) use leaf PMD/PUD. Rework hash-4k to use contiguous PMD and PUD instead. In that setup there are only two huge page sizes: 16M and 16G. 16M sits at PMD level and 16G at PUD level. pte_update

Re: [RFC PATCH v2 18/20] powerpc/64s: Use contiguous PMD/PUD instead of HUGEPD

2024-05-20 Thread Nicholas Piggin
On Sat May 18, 2024 at 5:00 AM AEST, Christophe Leroy wrote: > On book3s/64, the only user of hugepd is hash in 4k mode. > > All other setups (hash-64, radix-4, radix-64) use leaf PMD/PUD. > > Rework hash-4k to use contiguous PMD and PUD instead. > > In that setup there are only two huge page sizes

Re: [RFC PATCH v2 18/20] powerpc/64s: Use contiguous PMD/PUD instead of HUGEPD

2024-05-20 Thread Christophe Leroy
Le 20/05/2024 à 14:54, Nicholas Piggin a écrit : > On Sat May 18, 2024 at 5:00 AM AEST, Christophe Leroy wrote: >> On book3s/64, the only user of hugepd is hash in 4k mode. >> >> All other setups (hash-64, radix-4, radix-64) use leaf PMD/PUD. >> >> Rework hash-4k to use contiguous PMD and PUD ins

Re: [RFC PATCH v2 18/20] powerpc/64s: Use contiguous PMD/PUD instead of HUGEPD

2024-05-21 Thread Nicholas Piggin
On Tue May 21, 2024 at 2:43 AM AEST, Christophe Leroy wrote: > > > Le 20/05/2024 à 14:54, Nicholas Piggin a écrit : > > On Sat May 18, 2024 at 5:00 AM AEST, Christophe Leroy wrote: > >> On book3s/64, the only user of hugepd is hash in 4k mode. > >> > >> All other setups (hash-64, radix-4, radix-64)

Re: [RFC PATCH v2 18/20] powerpc/64s: Use contiguous PMD/PUD instead of HUGEPD

2024-05-22 Thread Christophe Leroy
Le 22/05/2024 à 03:13, Nicholas Piggin a écrit : > On Tue May 21, 2024 at 2:43 AM AEST, Christophe Leroy wrote: >> >> >> Le 20/05/2024 à 14:54, Nicholas Piggin a écrit : >>> On Sat May 18, 2024 at 5:00 AM AEST, Christophe Leroy wrote: On book3s/64, the only user of hugepd is hash in 4k mode.

Re: [RFC PATCH v2 18/20] powerpc/64s: Use contiguous PMD/PUD instead of HUGEPD

2024-05-22 Thread Jason Gunthorpe
On Wed, May 22, 2024 at 11:13:53AM +1000, Nicholas Piggin wrote: > From the mm/ side of things, hugetlb page tables are always walked via > the huge vma which knows the page size and could align address... I > guess except for fast gup? Which should be read-only. So okay you do > need to replicate