[PATCH v8 5/6] elf: Align large load segments to PMD huge page size for THP
H.J. Lu
hjl.tools@gmail.com
Thu Apr 9 23:47:13 GMT 2026
On Fri, Apr 10, 2026 at 6:46 AM Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>
> Hi HJ,
>
> > + unsigned long int default_thp_pagesize = DL_MAP_DEFAULT_THP_PAGESIZE;
> > + thp_mode = default_thp_pagesize ? thp_mode_always : __get_thp_mode ();
> > + thp_pagesize = default_thp_pagesize ? : __get_thp_size ();
>
> > We should call __get_hugepage_config to get both the THP page size as well
> > as the THP flags. The THP flags should be passed to mmap.
>
> No - this is about THP, not hugetlbfs.
>
> Cheers,
> Wilco
Do we need to call __madvise with MADV_HUGEPAGE?
--
H.J.
More information about the Libc-alpha
mailing list