[PATCH v6 1/1] Created tunable to force small pages on stack allocation.

Cupertino Miranda cupertino.miranda@oracle.com
Mon Apr 17 13:32:09 GMT 2023


>> Created tunable glibc.pthread.stack_hugetlb to control when hugepages
>> can be used for stack allocation.
>> In case THP are enabled and glibc.pthread.stack_hugetlb is set to
>> 0, glibc will madvise the kernel not to use allow hugepages for stack
>> allocations.
>
> Is this for the benefit of OpenJDK (among other things)?
Yes, it is actually. ;-)
>
> In this case, we should expose this in a pthread_attr_t interface as
> well, so that OpenJDK can activate this easily for the required threads.
> This can be done in a follow-up patch.
Totally aggree.
Our initial concern in proposing such change was to avoid big API
discussions when we were not sure if there was other simpler solution to
the problem.

I will work on such patches shortly if you think it is a good idea.

Thanks,
Cupertino


More information about the Libc-alpha mailing list