[PATCH] prctl.2: Add PR_GET/SET_THP_DISABLED information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds documentation for the new prctl option to disable
transparent hugepages on a per-mm_struct basis.  The patch that
implements this functionality can be found here:

http://www.mail-archive.com/linux-kernel@xxxxxxxxxxxxxxx/msg595756.html

(Note that the patch hasn't made it through into the community
 kernel, yet.  I'm submitting the documentation ahead of time
 to make sure that everything is in order if/when the patch
 makes it into the kernel.)

Please let me know if you notice anything that should be changed
or added.  Thanks!

Signed-off-by: Alex Thorlton <athorlton@xxxxxxx>
Cc: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx>
Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Cc: Christian Borntraeger <borntraeger@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@xxxxxxxxx>

---
 man2/prctl.2 | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/man2/prctl.2 b/man2/prctl.2
index 70636e5..1588064 100644
--- a/man2/prctl.2
+++ b/man2/prctl.2
@@ -773,6 +773,23 @@ option.
 .\" symbolic-link transitions over all process running in a system.
 .\" ========== END FIXME
 .RE
+.TP
+.BR PR_SET_THP_DISABLED " (since Linux 3.14)"
+If 
+.IR arg2
+is nonzero, set the "disable transparent hugepages" attribute of the calling process.
+Hugepages are disabled by manipulating the
+.BR VM_NOHUGEPAGE
+flag in
+.I def_flags
+of a process's
+.IR mm_struct .
+This flag is carried down from the parent's
+.IR mm_struct
+on fork.
+.TP
+.BR PR_GET_THP_DISABLED " (since Linux 3.14)"
+Returns (as the function result) the state of the "disable transparent hugepages" attribute of the calling process.  The result will be 1 if the attribute is set and 0 otherwise.
 .\"
 .SH RETURN VALUE
 On success,
@@ -783,6 +800,7 @@ On success,
 .BR PR_GET_TIMING ,
 .BR PR_GET_SECUREBITS ,
 .BR PR_MCE_KILL_GET ,
+.BR PR_GET_THP_DISABLED ,
 and (if it returns)
 .BR PR_GET_SECCOMP
 return the nonnegative values described above.
@@ -806,11 +824,12 @@ is not recognized.
 .B EINVAL
 .I option
 is
-.BR PR_MCE_KILL
-or
-.BR PR_MCE_KILL_GET
-or
+.BR PR_MCE_KILL ,
+.BR PR_MCE_KILL_GET ,
 .BR PR_SET_MM ,
+.BR PR_SET_THP_DISABLE
+or
+.BR PR_GET_THP_DISABLE ,
 and unused
 .BR prctl ()
 arguments were not specified as zero.
-- 
1.7.12.4

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux