[PATCH v8 5/6] elf: Align large load segments to PMD huge page size for THP

H.J. Lu hjl.tools@gmail.com
Sun Apr 12 14:18:03 GMT 2026


On Sun, Apr 12, 2026 at 10:02 PM Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>
> Hi HJ/Rui,
>
> >> The issue is that the current implementation requires and assumes
> >> THP enabled with always which impacts ALL memory mapping,
> >> including data.
> >>
> >
> > The current implementation is designed only for the scenario where
> > users have already chosen to run with THP in "always" mode.

Glibc can't make such an assumption which it has no control over.
It needs to check THP status at run-time.  I will have an incremental
patch to do that in a few days.

> Indeed, when things are faster in some cases but not in every case, it's
> not an "issue". It's QoI.
>
> I expect various targets want to benchmark this feature and enable it
> by default if it works out well. Once we reach that point, it is worth
> improving it further.
>
> Cheers,
> Wilco



-- 
H.J.


More information about the Libc-alpha mailing list