[PATCH v2] support: Skip malloc hugetlb={1, 2} variants when kernel cannot honor them

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed May 27 13:10:21 GMT 2026



On 27/05/26 10:00, Sam James wrote:
> 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")
I left over from debug... I will remove it.


More information about the Libc-alpha mailing list