[PATCH] Document glibc.pthread.stack_hugetlb does nothing in recent kernels

Florian Weimer fweimer@redhat.com
Tue Jan 21 19:21:53 GMT 2025


* Adhemerval Zanella Netto:

> On 20/01/25 17:42, Cristian Rodríguez wrote:
>> Since
>> c4608d1bf7c: mm: mmap: map MAP_STACK to VM_NOHUGEPAGE
>> 
>> All MAP_STACK allocations imply NOHUGEPAGE and the tunable does nothing.
>> 
>> Signed-off-by: Cristian Rodríguez <cristian@rodriguez.im>
>> ---
>>  manual/tunables.texi | 4 ++++
>>  1 file changed, 4 insertions(+)
>> 
>> diff --git a/manual/tunables.texi b/manual/tunables.texi
>> index 7f0246c789..468432fc57 100644
>> --- a/manual/tunables.texi
>> +++ b/manual/tunables.texi
>> @@ -509,6 +509,10 @@ its value to @code{0} enables the use of @code{madvise} with
>>  This is a memory utilization optimization, since internal glibc setup of either
>>  the thread descriptor and the guard page might force the kernel to move the
>>  thread stack originally backup by Huge Pages to default pages.
>> +
>> +This tunable has no effect on the linux kernel version 6.7

I think we generally write “Linux” (except where we allude to the
sysdeps/unix/sysv/linux directory).

> I think it was changed only for 6.8, and git describe seems to agree:
>
> $ git describe c4608d1bf7c
> v6.8-rc1-8-gc4608d1bf7c6
>
> Besides that, the patch is ok.  Should we eventually phase out this tunable?

It should be phased out, yes.

Thanks,
Florian



More information about the Libc-alpha mailing list