aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-05-30 17:41:39 +0200
committerAlejandro Colomar <alx@kernel.org>2024-05-31 17:09:32 +0200
commitf0c9393f6458ad6bd6c53cdc297df63d0eaaba9c (patch)
tree4ca71d01c232bade5f580b2789a1b13b21c9f463
parente0db1fc6cff12960097ca34577649c7cead46b12 (diff)
downloadman-pages-f0c9393f6458ad6bd6c53cdc297df63d0eaaba9c.tar.gz
prctl.2, PR_SET_THP_DISABLE.2const: Split PR_SET_THP_DISABLE from prctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--man/man2/prctl.220
-rw-r--r--man/man2const/PR_SET_THP_DISABLE.2const47
2 files changed, 50 insertions, 17 deletions
diff --git a/man/man2/prctl.2 b/man/man2/prctl.2
index 8e1578e082..6c59d2cb18 100644
--- a/man/man2/prctl.2
+++ b/man/man2/prctl.2
@@ -139,23 +139,8 @@ The first argument can be:
.B PR_TASK_PERF_EVENTS_DISABLE
.TQ
.B PR_TASK_PERF_EVENTS_ENABLE
-.\" prctl PR_SET_THP_DISABLE
-.TP
-.BR PR_SET_THP_DISABLE " (since Linux 3.15)"
-.\" commit a0715cc22601e8830ace98366c0c2bd8da52af52
-Set the state of the "THP disable" flag for the calling thread.
-If
-.I 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
-.BR 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
-.BR fork (2)
-and is preserved across
-.BR execve (2).
+.TQ
+.B PR_SET_THP_DISABLE
.\" prctl PR_GET_THP_DISABLE
.TP
.BR PR_GET_THP_DISABLE " (since Linux 3.15)"
@@ -490,4 +475,5 @@ glibc 2.0.6
.BR PR_GET_TAGGED_ADDR_CTRL (2const),
.BR PR_TASK_PERF_EVENTS_DISABLE (2const),
.BR PR_TASK_PERF_EVENTS_ENABLE (2const),
+.BR PR_SET_THP_DISABLE (2const),
.BR core (5)
diff --git a/man/man2const/PR_SET_THP_DISABLE.2const b/man/man2const/PR_SET_THP_DISABLE.2const
new file mode 100644
index 0000000000..aac92ecbda
--- /dev/null
+++ b/man/man2const/PR_SET_THP_DISABLE.2const
@@ -0,0 +1,47 @@
+.\" Copyright 2014, 2015, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH PR_SET_THP_DISABLE 2const (date) "Linux man-pages (unreleased)"
+.SH NAME
+PR_SET_THP_DISABLE
+\-
+set the state of the "THP disable" flag for the calling thread
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B #include <sys/prctl.h>
+.P
+.BI "int prctl(int " op ", ...);"
+.fi
+.SH DESCRIPTION
+.TP
+.BR PR_SET_THP_DISABLE " (since Linux 3.15)"
+.\" commit a0715cc22601e8830ace98366c0c2bd8da52af52
+Set the state of the "THP disable" flag for the calling thread.
+If
+.I 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
+.BR 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
+.BR fork (2)
+and is preserved across
+.BR execve (2).
+.SH RETURN VALUE
+On success,
+0 is returned.
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.SH SEE ALSO
+.BR prctl (2),
+.BR PR_GET_THP_DISABLE (2const)