From: Xi Ruoyao <xry111@xry111.site>
To: libc-alpha@sourceware.org
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
"Andreas K . Huettel" <dilfridge@gentoo.org>,
WANG Rui <wangrui@loongson.cn>, Henry Chen <chenx97@aosc.io>,
Mingcong Bai <jeffbai@aosc.io>, Xi Ruoyao <xry111@xry111.site>
Subject: [PATCH] tests: Align THP tests to the 32MB huge-page size
Date: Wed, 22 Jul 2026 04:01:38 +0800 [thread overview]
Message-ID: <20260721200148.1706264-1-xry111@xry111.site> (raw)
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.
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
--
2.55.0
next reply other threads:[~2026-07-21 20:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 20:01 Xi Ruoyao [this message]
2026-07-22 9:23 ` Andreas K. Huettel
2026-07-22 11:33 ` Xi Ruoyao
2026-07-22 15:58 Wilco Dijkstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260721200148.1706264-1-xry111@xry111.site \
--to=xry111@xry111.site \
--cc=adhemerval.zanella@linaro.org \
--cc=chenx97@aosc.io \
--cc=dilfridge@gentoo.org \
--cc=jeffbai@aosc.io \
--cc=libc-alpha@sourceware.org \
--cc=wangrui@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).