Re: [PATCH] tests: Align THP tests to the 32MB huge-page size

"Andreas K. Huettel" <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Organization Gentoo Linux
Message-ID <[email protected]>
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 <[email protected]>
> ---
> 
> 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
[email protected]
Gentoo Linux developer 
(council, comrel, toolchain, base-system, perl, libreoffice)
https://wiki.gentoo.org/wiki/User:Dilfridge
signature.asc (application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE-----

iQJPBAABCAA5FiEE/Rnm0xsZLuTcY+rT3CsWIV7VQSoFAmpgjC8bFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyAAoJENwrFiFe1UEqxxkQAIUwfezjQguOuihPsJwp
G9Gpu746xPVtrBkfbLGts5XTQhFgbR1rkR1KAQ3MtobHwDwowy7eA0wNCwPKdmyf
aC8PqVcDV+20X9VwyCd5Xl1cvqjIhzsy1ITScuR4RyjvlqtkFJWdbITmxwHpUXrv
h3Zjfa2KsGXROlvlTuYg9QhXrBsv09YF55FHdH/3JaGvWQH7TZOyz4e0Rc4Kd+Ll
Od2S0CWIyuuZkA30a72GxIFhP2lUuPtbpdEHw2dMF/ftqIweQnc1CYnxZlyP3ePr
FNZ7Cu2TtHseb6H2exPGDZAVWKq6euexCSfgQlLI5BmZAuZAi6FsjVq5nB8yXThC
aB5wHWnHdIZdxKjpGIt1ziVigCiZ/WYVhgopO2sXQVvKz2ZKUrXc5DidNO7hPbwc
/giaAFilelRsTJxmKauDfsqxtOsmiUsb/o5E4ET4nniUYDgBSik6IXjLsKYJYRxp
fRRsTJgSTsmbrtLqKREw8Hftsu94rX84G+P7yLHle6rjpu7vPRTG+Oc5il4vjX+B
9562lDjLgbRRxyXKhzlLkv08DlPa3o6/xusle+nKkXQPQR4Sgxszzg3vXfm6Vl1U
rp32w4gD8K1CvW1Vk1zTdKDpD099+Te22zDUA0syDc6hb+aY6ch7CHbUCCwku8/l
Ll/4SAAnCOxnQDZJxXyK3nYW
=2vCP
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.