[PATCH v2] support: Skip malloc hugetlb={1, 2} variants when kernel cannot honor them
Sam James
sam@gentoo.org
Wed May 27 13:00:31 GMT 2026
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> The malloc test variants run with GLIBC_TUNABLES=glibc.malloc.hugetlb=1
> exercise transparent huge pages via MADV_HUGEPAGE, which is only
> meaningful when /sys/kernel/mm/transparent_hugepage/enabled is set to
> 'madvise' ('always' makes the madvise redundant and 'never' makes it
> ineffective). The hugetlb=2 variants rely on MAP_HUGETLB, which
> requires a positive /proc/sys/vm/nr_hugepages. On systems that do not
> satisfy these prerequisites - including any non-Linux target - those
> runs only consume CPU time in this case.
>
>
> [...]
>
> --- /dev/null
> +++ b/support/support_check_hugetlb.c
> @@ -0,0 +1,81 @@
> [...]
> +
> +#pragma GCC optimize ("O1")
What's this for?
> [...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 418 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260527/5fcedaa8/attachment-0001.sig>
More information about the Libc-alpha
mailing list