* Are 256K page sizes really a thing (on ppc64le in particular)?
@ 2024-09-28 16:08 Florian Weimer
2024-09-28 16:38 ` LEROY Christophe
0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2024-09-28 16:08 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Peter Bergner
I'm working on adding a <sys/pagesize.h> header to glibc, so that
programmers can easily determine the range of possible page sizes for a
particular target, for things like pointer tagging and mapped file
alignment requirements.
I'm not familiar from the Kconfig system, but as far as I can tell, this
ensures that 256 KiB pages are only available on 44x machines:
arch/powerpc/Kconfig-config PPC_256K_PAGES
arch/powerpc/Kconfig- bool "256k page size (Requires non-standard binutils settings)"
arch/powerpc/Kconfig- depends on 44x && !PPC_47x
arch/powerpc/Kconfig: select HAVE_PAGE_SIZE_256KB
And none of the 44x configurations set 64BIT, so it's all 32-bit.
Would it still make sense to recommend 256 KiB file alignment to
programmers on 32-bit PowerPC, or should <sys/pagesize.h> pretend
that the maximum page size is 64 KiB?
Thanks,
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Are 256K page sizes really a thing (on ppc64le in particular)?
2024-09-28 16:08 Are 256K page sizes really a thing (on ppc64le in particular)? Florian Weimer
@ 2024-09-28 16:38 ` LEROY Christophe
2024-09-29 11:24 ` Michael Ellerman
0 siblings, 1 reply; 3+ messages in thread
From: LEROY Christophe @ 2024-09-28 16:38 UTC (permalink / raw)
To: Florian Weimer, linuxppc-dev@lists•ozlabs.org; +Cc: Peter Bergner
Le 28/09/2024 à 18:08, Florian Weimer a écrit :
> I'm working on adding a <sys/pagesize.h> header to glibc, so that
> programmers can easily determine the range of possible page sizes for a
> particular target, for things like pointer tagging and mapped file
> alignment requirements.
>
> I'm not familiar from the Kconfig system, but as far as I can tell, this
> ensures that 256 KiB pages are only available on 44x machines:
>
> arch/powerpc/Kconfig-config PPC_256K_PAGES
> arch/powerpc/Kconfig- bool "256k page size (Requires non-standard binutils settings)"
> arch/powerpc/Kconfig- depends on 44x && !PPC_47x
> arch/powerpc/Kconfig: select HAVE_PAGE_SIZE_256KB
>
> And none of the 44x configurations set 64BIT, so it's all 32-bit.
>
> Would it still make sense to recommend 256 KiB file alignment to
> programmers on 32-bit PowerPC, or should <sys/pagesize.h> pretend
> that the maximum page size is 64 KiB?
>
For ppc64le it is definitely not a thing.
As you noticed, 256K pages are only for 44x which is a 32 bits
processor, and as mentioned in the CONFIG_PPC_256K_PAGES help:
The kernel will only be able to run applications that have been
compiled with '-zmax-page-size' set to 256K (the default is 64K) using
binutils later than 2.17.50.0.3, or by patching the ELF_MAXPAGESIZE
definition from 0x10000 to 0x40000 in older versions.
So 256 Kbytes pages is a corner case and I think the default max
alignment should remain 64 Kbytes.
Christophe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Are 256K page sizes really a thing (on ppc64le in particular)?
2024-09-28 16:38 ` LEROY Christophe
@ 2024-09-29 11:24 ` Michael Ellerman
0 siblings, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2024-09-29 11:24 UTC (permalink / raw)
To: LEROY Christophe, Florian Weimer, linuxppc-dev@lists•ozlabs.org
Cc: Peter Bergner
LEROY Christophe <christophe.leroy2@cs-soprasteria•com> writes:
> Le 28/09/2024 à 18:08, Florian Weimer a écrit :
>> I'm working on adding a <sys/pagesize.h> header to glibc, so that
>> programmers can easily determine the range of possible page sizes for a
>> particular target, for things like pointer tagging and mapped file
>> alignment requirements.
>>
>> I'm not familiar from the Kconfig system, but as far as I can tell, this
>> ensures that 256 KiB pages are only available on 44x machines:
>>
>> arch/powerpc/Kconfig-config PPC_256K_PAGES
>> arch/powerpc/Kconfig- bool "256k page size (Requires non-standard binutils settings)"
>> arch/powerpc/Kconfig- depends on 44x && !PPC_47x
>> arch/powerpc/Kconfig: select HAVE_PAGE_SIZE_256KB
>>
>> And none of the 44x configurations set 64BIT, so it's all 32-bit.
>>
>> Would it still make sense to recommend 256 KiB file alignment to
>> programmers on 32-bit PowerPC, or should <sys/pagesize.h> pretend
>> that the maximum page size is 64 KiB?
>>
>
> For ppc64le it is definitely not a thing.
>
> As you noticed, 256K pages are only for 44x which is a 32 bits
> processor, and as mentioned in the CONFIG_PPC_256K_PAGES help:
>
> The kernel will only be able to run applications that have been
> compiled with '-zmax-page-size' set to 256K (the default is 64K) using
> binutils later than 2.17.50.0.3, or by patching the ELF_MAXPAGESIZE
> definition from 0x10000 to 0x40000 in older versions.
>
>
> So 256 Kbytes pages is a corner case and I think the default max
> alignment should remain 64 Kbytes.
I agree.
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-29 11:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-28 16:08 Are 256K page sizes really a thing (on ppc64le in particular)? Florian Weimer
2024-09-28 16:38 ` LEROY Christophe
2024-09-29 11:24 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox