[PATCH v8 1/6] hugepages: Move THP helpers to generic hugepages abstraction
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Tue Apr 7 14:28:26 GMT 2026
Hi Rui,
> The helpers for determining the default transparent huge page size
> and THP mode are currently implemented in malloc-hugepages. However,
> these interfaces are not malloc-specific and are also needed by other
> subsystems (e.g. the dynamic loader for segment alignment).
>
> Introduce a new generic hugepages abstraction and move the THP mode
> detection, default THP page size probing, and hugepage configuration
> helpers there. The malloc code now calls into the generic helpers
> instead of duplicating the sysfs parsing.
>
> There is no functional change. This is a pure refactoring to make
> the THP detection reusable outside of malloc.
>
> Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
> Signed-off-by: WANG Rui <wangrui@loongson.cn>
Thanks for the rebase, I've committed this now.
Cheers,
Wilco
More information about the Libc-alpha
mailing list