[PATCH v6 4/6] tunables: Add glibc.elf.hugetlb tunable for THP-aware segment alignment
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Mon Mar 9 17:12:29 GMT 2026
Hi Rui,
> Introduce a new tunable, `glibc.elf.hugetlb`, to control
> Transparent Huge Page (THP) aware alignment of ELF loadable segments.
>
> When set to `1`, the dynamic loader will attempt to align sufficiently
> large `PT_LOAD` segments to the PMD huge page size when mapping them.
> This increases the likelihood that the kernel backs these mappings with
> Transparent Huge Pages.
>
> The default value is `0`, which preserves the traditional page-sized
> alignment and keeps existing behavior unchanged.
>
> On systems without THP support, or when THP is disabled in the kernel,
> enabling this tunable has no effect.
Looks good to me.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cheers,
Wilco
More information about the Libc-alpha
mailing list