[PATCH] Document glibc.pthread.stack_hugetlb does nothing in recent kernels
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Tue Jan 21 15:28:48 GMT 2025
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 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?
> +or later where MADV_NOHUGEPAGE is the default for stack mappings.
> +
> @end deftp
>
> @node Hardware Capability Tunables
More information about the Libc-alpha
mailing list