[RFC] Stack allocation, hugepages and RSS implications

Cupertino Miranda cupertino.miranda@oracle.com
Wed Mar 8 15:12:45 GMT 2023


Cristian Rodríguez writes:

> On Wed, Mar 8, 2023 at 11:17 AM Cupertino Miranda via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
>>
>>
>> Hi everyone,
>
>> In any case, I wonder if there is an actual use case where an hugepage would
>> survive glibc stack allocation and will bring an actual benefit.
>>
>> Looking forward for your comments.
>
> I think you could just post a patch to disable hugepages for this allocation.
> Are you sure this is the only case though ? There are probably several
> cases where using hugepages is non-optimal.

No, pthread_create itself might not be the only case. I am considering
to make that change in allocate_stack code, which would also fix it for
the main thread stack alloction.

If you are asking about other types of memory allocations, I do not
know.


More information about the Libc-alpha mailing list