[PATCH v2 4/4] loongarch: Enable THP-aligned load segments by default and define THP page size
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Feb 26 13:44:42 GMT 2026
Hi Wang,
+#define DEFAULT_THP_PAGESIZE (32 * 1024 * 1024)
+
+#include_next <malloc-hugepages.h>
This also affects malloc behaviour, and for a size this huge, you need to
benchmark it carefully. The current malloc code doesn't check whether a given
huge page size makes sense. It doesn't take the option to start with small
allocations and only use huge pages when you do a large allocation. The
32MB size is also the max size of default arena - as a result it may not work
as expected.
Cheers,
Wilco
More information about the Libc-alpha
mailing list