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

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Jul 15 11:23:18 GMT 2026



On 15/07/26 08:13, H.J. Lu wrote:
> 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.
> 
> 

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>


More information about the Libc-alpha mailing list