* Documenting prctl() PR_SET_THP_DISABLE and PR_GET_THP_DISABLE
@ 2014-04-14 10:15 Michael Kerrisk
2014-04-14 15:49 ` Alex Thorlton
0 siblings, 1 reply; 3+ messages in thread
From: Michael Kerrisk @ 2014-04-14 10:15 UTC (permalink / raw)
To: Alex Thorlton
Cc: Linux Kernel, Gerald Schaefer, Martin Schwidefsky, Heiko Carstens,
Christian Borntraeger, Andrew Morton, Paolo Bonzini,
Kirill A. Shutemov, Mel Gorman, Rik van Riel, Ingo Molnar,
Peter Zijlstra, Andrea Arcangeli, Oleg Nesterov,
Eric W. Biederman, Alexander Viro, linux-mm, Linux API, linux-man,
Michael Kerrisk-manpages
Alex,
Your commit a0715cc22601e8830ace98366c0c2bd8da52af52 added the prctl()
PR_SET_THP_DISABLE and PR_GET_THP_DISABLE flags.
The text below attempts to document these flags for the prctl(3).
Could you (and anyone else who is willing) please review the text
below (one or two p[ieces of which are drawn from your commit message)
to verify that it accurately reflects reality and your intent, and
that I have not missed any significant details.
DESCRIPTION
...
PR_SET_THP_DISABLE (since Linux 3.15)
Set the state of the "THP disable" flag for the calling
thread. If arg2 has a nonzero value, the flag is set,
otherwise it is cleared. Setting this flag provides a
method for disabling transparent huge pages for jobs
where the code cannot be modified, and using a malloc
hook with madvise(2) is not an option (i.e., statically
allocated data). The setting of the "THP disable" flag
is inherited by a child created via fork(2) and is pre‐
served across execve(2).
PR_GET_THP_DISABLE (since Linux 3.15)
Return (via the function result) the current setting of
the "THP disable" flag for the calling thread: either 1,
if the flag is set, or 0, if it is not.
...
RETURN VALUE
On success, PR_GET_DUMPABLE, PR_GET_KEEPCAPS,
PR_GET_NO_NEW_PRIVS, PR_GET_THP_DISABLE, PR_CAPBSET_READ,
PR_GET_TIMING, PR_GET_TIMERSLACK, PR_GET_SECUREBITS,
PR_MCE_KILL_GET, and (if it returns) PR_GET_SECCOMP return the
nonnegative values described above. All other option values
return 0 on success. On error, -1 is returned, and errno is
set appropriately.
...
ERRORS
EINVAL option is PR_SET_THP_DISABLE and arg3, arg4, or arg5 is
nonzero.
EINVAL option is PR_GET_THP_DISABLE and arg2, arg3, arg4, or
arg5 is nonzero.
Thanks,
Michael
--
Michael Kerrisk Linux man-pages maintainer;
http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface", http://blog.man7.org/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Documenting prctl() PR_SET_THP_DISABLE and PR_GET_THP_DISABLE
2014-04-14 10:15 Documenting prctl() PR_SET_THP_DISABLE and PR_GET_THP_DISABLE Michael Kerrisk
@ 2014-04-14 15:49 ` Alex Thorlton
2014-04-14 21:08 ` Michael Kerrisk (man-pages)
0 siblings, 1 reply; 3+ messages in thread
From: Alex Thorlton @ 2014-04-14 15:49 UTC (permalink / raw)
To: Michael Kerrisk
Cc: Linux Kernel, Gerald Schaefer, Martin Schwidefsky, Heiko Carstens,
Christian Borntraeger, Andrew Morton, Paolo Bonzini,
Kirill A. Shutemov, Mel Gorman, Rik van Riel, Ingo Molnar,
Peter Zijlstra, Andrea Arcangeli, Oleg Nesterov,
Eric W. Biederman, Alexander Viro, linux-mm, Linux API, linux-man
On Mon, Apr 14, 2014 at 12:15:01PM +0200, Michael Kerrisk wrote:
> Alex,
>
> Your commit a0715cc22601e8830ace98366c0c2bd8da52af52 added the prctl()
> PR_SET_THP_DISABLE and PR_GET_THP_DISABLE flags.
>
> The text below attempts to document these flags for the prctl(3).
> Could you (and anyone else who is willing) please review the text
> below (one or two p[ieces of which are drawn from your commit message)
> to verify that it accurately reflects reality and your intent, and
> that I have not missed any significant details.
Looks fine to me!
- Alex
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Documenting prctl() PR_SET_THP_DISABLE and PR_GET_THP_DISABLE
2014-04-14 15:49 ` Alex Thorlton
@ 2014-04-14 21:08 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2014-04-14 21:08 UTC (permalink / raw)
To: Alex Thorlton
Cc: Linux Kernel, Gerald Schaefer, Martin Schwidefsky, Heiko Carstens,
Christian Borntraeger, Andrew Morton, Paolo Bonzini,
Kirill A. Shutemov, Mel Gorman, Rik van Riel, Ingo Molnar,
Peter Zijlstra, Andrea Arcangeli, Oleg Nesterov,
Eric W. Biederman, Alexander Viro, linux-mm, Linux API, linux-man
On Mon, Apr 14, 2014 at 5:49 PM, Alex Thorlton <athorlton@sgi.com> wrote:
> On Mon, Apr 14, 2014 at 12:15:01PM +0200, Michael Kerrisk wrote:
>> Alex,
>>
>> Your commit a0715cc22601e8830ace98366c0c2bd8da52af52 added the prctl()
>> PR_SET_THP_DISABLE and PR_GET_THP_DISABLE flags.
>>
>> The text below attempts to document these flags for the prctl(3).
>> Could you (and anyone else who is willing) please review the text
>> below (one or two p[ieces of which are drawn from your commit message)
>> to verify that it accurately reflects reality and your intent, and
>> that I have not missed any significant details.
>
> Looks fine to me!
Thanks, Alex.
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-14 21:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 10:15 Documenting prctl() PR_SET_THP_DISABLE and PR_GET_THP_DISABLE Michael Kerrisk
2014-04-14 15:49 ` Alex Thorlton
2014-04-14 21:08 ` Michael Kerrisk (man-pages)
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).