[PATCH] tests: Align THP tests to the 32MB huge-page size
Andreas K. Huettel
dilfridge@gentoo.org
Wed Jul 22 09:23:59 GMT 2026
Am Mittwoch, 22. Juli 2026, 05:01:38 Japanische Normalzeit schrieb Xi Ruoyao:
> On MIPS64 and AArch64 systems with 16-KiB pages, the PMD size is 32MB.
> As we already have multiple platforms requiring such a large size, it
> seems easier to raise the default instead of adding more special cases.
Let's not do this now anymore, however simple it may be.
(More likely to agree with an arch-specific fix for now, if it's absolutely
necessary for the release (which it isnt).)
>
> Link: https://sourceware.org/glibc/wiki/Testing/Tests/elf/tst-thp-1
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> ---
>
> Tested on x86_64-linux and mips64-linux.
>
> sysdeps/unix/sysv/linux/Makefile | 4 ++--
> sysdeps/unix/sysv/linux/loongarch/Makefile | 3 ---
> sysdeps/unix/sysv/linux/sparc/Makefile | 5 -----
> 3 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
> index 14a56d5cc3..9d3608c352 100644
> --- a/sysdeps/unix/sysv/linux/Makefile
> +++ b/sysdeps/unix/sysv/linux/Makefile
> @@ -733,8 +733,8 @@ endif
> ifndef THP-PAGE-SIZE
> # Align PT_LOAD segments in THP tests to THP page size so that kernel will
> # map PIE to the address aligned to THP page size. Default THP page size
> -# to 2MB which can be overridden in Makefile in subdirectories.
> -THP-PAGE-SIZE = 0x200000
> +# to 32MB which can be overridden in Makefile in subdirectories.
> +THP-PAGE-SIZE = 0x2000000
> endif
>
> THP-PAGE-SIZE-CFLAGS = -DTHP_PAGE_SIZE=$(THP-PAGE-SIZE)
> diff --git a/sysdeps/unix/sysv/linux/loongarch/Makefile b/sysdeps/unix/sysv/linux/loongarch/Makefile
> index d5beb62440..0d5f087862 100644
> --- a/sysdeps/unix/sysv/linux/loongarch/Makefile
> +++ b/sysdeps/unix/sysv/linux/loongarch/Makefile
> @@ -12,6 +12,3 @@ abi-ilp32s-condition := __WORDSIZE == 32 && defined __loongarch_soft_float
> abi-ilp32d-condition := __WORDSIZE == 32 && defined __loongarch_double_float
> abi-lp64s-condition := __WORDSIZE == 64 && defined __loongarch_soft_float
> abi-lp64d-condition := __WORDSIZE == 64 && defined __loongarch_double_float
> -
> -# Align THP tests to 32MB.
> -THP-PAGE-SIZE = 0x2000000
> diff --git a/sysdeps/unix/sysv/linux/sparc/Makefile b/sysdeps/unix/sysv/linux/sparc/Makefile
> index 57e73d0a14..e0056c9413 100644
> --- a/sysdeps/unix/sysv/linux/sparc/Makefile
> +++ b/sysdeps/unix/sysv/linux/sparc/Makefile
> @@ -14,8 +14,3 @@ endif
> ifeq ($(subdir),signal)
> sysdep_routines += sigreturn_stub
> endif
> -
> -ifeq ($(subdir),elf)
> -# The sparc64 uses an 8KB base page and 8MB PMD transparent huge page
> -THP-PAGE-SIZE = 0x800000
> -endif
>
--
PD Dr. Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer
(council, comrel, toolchain, base-system, perl, libreoffice)
https://wiki.gentoo.org/wiki/User:Dilfridge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 870 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260722/1ebdd7e7/attachment.sig>
More information about the Libc-alpha
mailing list