From: Usama Arif <usamaarif642@gmail.com>
To: alx@kernel.org
Cc: linux-man@vger.kernel.org, david@redhat.com,
lorenzo.stoakes@oracle.com, hannes@cmpxchg.org,
baohua@kernel.org, shakeel.butt@linux.dev, ziy@nvidia.com,
laoar.shao@gmail.com, baolin.wang@linux.alibaba.com,
Liam.Howlett@oracle.com, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH] PR_*ET_THP_DISABLE.2const: document addition of PR_THP_DISABLE_EXCEPT_ADVISED
Date: Fri, 5 Sep 2025 14:26:28 +0100 [thread overview]
Message-ID: <02ff9dc0-2ce2-4241-9969-e09f48026f8d@gmail.com> (raw)
In-Reply-To: <20250905132536.1998767-1-usamaarif642@gmail.com>
On 05/09/2025 14:25, Usama Arif wrote:
> PR_THP_DISABLE_EXCEPT_ADVISED extended PR_SET_THP_DISABLE to only provide
> THPs when advised. IOW, it allows individual processes to opt-out of THP =
> "always" into THP = "madvise", without affecting other workloads on the
> system. The series has been merged in [1]. Before [1], the following 2
> calls were allowed with PR_SET_THP_DISABLE:
>
> prctl(PR_SET_THP_DISABLE, 0, 0, 0, 0); // to reset THP setting.
> prctl(PR_SET_THP_DISABLE, 1, 0, 0, 0); // to disable THPs completely.
>
> Now in addition to the 2 calls above, you can do:
>
> prctl(PR_SET_THP_DISABLE, 1, PR_THP_DISABLE_EXCEPT_ADVISED, 0, 0); // to
> disable THPs except madvise.
>
> This patch documents the changes introduced due to the addition of
> PR_THP_DISABLE_EXCEPT_ADVISED flag:
> - PR_GET_THP_DISABLE returns a value whose bits indicate how THP-disable
> is configured for the calling thread (with or without
> PR_THP_DISABLE_EXCEPT_ADVISED).
> - PR_SET_THP_DISABLE now uses arg3 to specify whether to disable THP
> completely for the process, or disable except madvise
> (PR_THP_DISABLE_EXCEPT_ADVISED).
>
> [1] https://lore.kernel.org/all/20250815135549.130506-1-usamaarif642@gmail.com/
>
> Signed-off-by: Usama Arif <usamaarif642@gmail.com>
> ---
> v1 -> v2 (Alejandro Colomar):
> - Fixed diuble negation on when MADV_HUGEPAGE will succeed
> - Turn return values of PR_GET_THP_DISABLE into a table
> - Turn madvise calls into full italics
> - Use semantic newlines
> ---
Ah forgot to add "v2" to subject.
next prev parent reply other threads:[~2025-09-05 13:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 13:25 [PATCH] PR_*ET_THP_DISABLE.2const: document addition of PR_THP_DISABLE_EXCEPT_ADVISED Usama Arif
2025-09-05 13:26 ` Usama Arif [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-01 16:09 Usama Arif
2025-09-01 16:18 ` Usama Arif
2025-09-01 16:38 ` David Hildenbrand
2025-09-01 16:40 ` Alejandro Colomar
2025-09-01 17:01 ` Usama Arif
2025-09-01 16:36 ` Alejandro Colomar
2025-09-01 16:58 ` Usama Arif
2025-09-02 8:19 ` Alejandro Colomar
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=02ff9dc0-2ce2-4241-9969-e09f48026f8d@gmail.com \
--to=usamaarif642@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=alx@kernel.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=shakeel.butt@linux.dev \
--cc=ziy@nvidia.com \
/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 NNTP newsgroup(s).