[RFC PATCH v4 12/16] powerpc/e500: Encode hugepage size in PTE bits

2024-05-27 Thread Christophe Leroy
Use U0-U3 bits to encode hugepage size, more exactly page shift. As we start using hugepages at shift 21 (2Mbytes), substract 20 so that it fits into 4 bits. That may change in the future if we want to use smaller hugepages. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/hu

Re: [RFC PATCH v4 12/16] powerpc/e500: Encode hugepage size in PTE bits

2024-05-29 Thread Oscar Salvador
On Mon, May 27, 2024 at 03:30:10PM +0200, Christophe Leroy wrote: > Use U0-U3 bits to encode hugepage size, more exactly page shift. > > As we start using hugepages at shift 21 (2Mbytes), substract 20 > so that it fits into 4 bits. That may change in the future if > we want to use smaller hugepage

Re: [RFC PATCH v4 12/16] powerpc/e500: Encode hugepage size in PTE bits

2024-05-29 Thread Christophe Leroy
Le 29/05/2024 à 10:05, Oscar Salvador a écrit : > [Vous ne recevez pas souvent de courriers de osalva...@suse.com. D?couvrez > pourquoi ceci est important ? https://aka.ms/LearnAboutSenderIdentification ] > > On Mon, May 27, 2024 at 03:30:10PM +0200, Christophe Leroy wrote: >> Use U0-U3 bits to

Re: [RFC PATCH v4 12/16] powerpc/e500: Encode hugepage size in PTE bits

2024-05-29 Thread Oscar Salvador
On Wed, May 29, 2024 at 09:49:48AM +, Christophe Leroy wrote: > Doesn't really matter if it's PUD or PMD at this point. On a 32 bits > kernel it will be all PMD while on a 64 bits kernel it is both PMD and PUD. > > At the time being (as implemented with hugepd), Linux support 4M, 16M, > 64M,

Re: [RFC PATCH v4 12/16] powerpc/e500: Encode hugepage size in PTE bits

2024-05-29 Thread Oscar Salvador
On Wed, May 29, 2024 at 10:14:15AM +, Christophe Leroy wrote: > > > Le 29/05/2024 à 12:09, Oscar Salvador a écrit : > > On Wed, May 29, 2024 at 09:49:48AM +, Christophe Leroy wrote: > >> Doesn't really matter if it's PUD or PMD at this point. On a 32 bits > >> kernel it will be all PMD wh

Re: [RFC PATCH v4 12/16] powerpc/e500: Encode hugepage size in PTE bits

2024-05-29 Thread Christophe Leroy
Le 29/05/2024 à 12:09, Oscar Salvador a écrit : > On Wed, May 29, 2024 at 09:49:48AM +, Christophe Leroy wrote: >> Doesn't really matter if it's PUD or PMD at this point. On a 32 bits >> kernel it will be all PMD while on a 64 bits kernel it is both PMD and PUD. >> >> At the time being (as im