public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Cristian Rodríguez" <cristian@rodriguez.im>
To: libc-alpha@sourceware.org
Cc: "Cristian Rodríguez" <cristian@rodriguez.im>
Subject: [PATCH] Document glibc.pthread.stack_hugetlb does nothing in recent kernels
Date: Mon, 20 Jan 2025 17:42:29 -0300	[thread overview]
Message-ID: <20250120204233.12181-1-cristian@rodriguez.im> (raw)

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
+or later where MADV_NOHUGEPAGE is the default for stack mappings.
+
 @end deftp
 
 @node Hardware Capability Tunables
-- 
2.48.1


             reply	other threads:[~2025-01-20 20:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20 20:42 Cristian Rodríguez [this message]
2025-01-21 15:28 ` Adhemerval Zanella Netto
2025-01-21 19:21   ` Florian Weimer
2025-01-21 23:21     ` Cristian Rodríguez
2025-01-22 12:23       ` Adhemerval Zanella Netto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250120204233.12181-1-cristian@rodriguez.im \
    --to=cristian@rodriguez.im \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).