[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <02ff9dc0-2ce2-4241-9969-e09f48026f8d@gmail.com>
Date: Fri, 5 Sep 2025 14:26:28 +0100
From: Usama Arif <usamaarif642@...il.com>
To: alx@...nel.org
Cc: linux-man@...r.kernel.org, david@...hat.com, lorenzo.stoakes@...cle.com,
hannes@...xchg.org, baohua@...nel.org, shakeel.butt@...ux.dev,
ziy@...dia.com, laoar.shao@...il.com, baolin.wang@...ux.alibaba.com,
Liam.Howlett@...cle.com, linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH] PR_*ET_THP_DISABLE.2const: document addition of
PR_THP_DISABLE_EXCEPT_ADVISED
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@...il.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.
Powered by blists - more mailing lists