[PATCH v2] thp: Disable THP if THP isn't supported by kernel

H.J. Lu hjl.tools@gmail.com
Wed Jul 15 11:13:46 GMT 2026


Since DL_MAP_DEFAULT_THP_PAGESIZE is defined for x86-64, THP control
is to set to madvise by default.  If THP is disabled in x86-64 kernel,
madvise (..., MADV_HUGEPAGE) returns -EINVAL to indicate that THP isn't
supported.  Add _dl_thp_madvise to disable THP in this case.  This
fixes BZ #34348.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-thp-Disable-THP-if-THP-isn-t-supported-by-kernel.patch
Type: text/x-patch
Size: 4743 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260715/95d3ba09/attachment-0001.bin>


More information about the Libc-alpha mailing list