linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michael Kerrisk <mtk.manpages@gmail.com>
To: Alex Thorlton <athorlton@sgi.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Gerald Schaefer <gerald.schaefer@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Oleg Nesterov <oleg@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-mm <linux-mm@kvack.org>,
	Linux API <linux-api@vger.kernel.org>,
	linux-man@vger.kernel.org,
	Michael Kerrisk-manpages <mtk.manpages@gmail.com>
Subject: Documenting prctl() PR_SET_THP_DISABLE and PR_GET_THP_DISABLE
Date: Mon, 14 Apr 2014 12:15:01 +0200	[thread overview]
Message-ID: <CAHO5Pa0VCzR7oqNXkwELuAsNQnnvF8Xoo=CuCaM64-GzjDuoFA@mail.gmail.com> (raw)

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>

             reply	other threads:[~2014-04-14 10:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 10:15 Michael Kerrisk [this message]
2014-04-14 15:49 ` Alex Thorlton
2014-04-14 21:08   ` Michael Kerrisk (man-pages)

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='CAHO5Pa0VCzR7oqNXkwELuAsNQnnvF8Xoo=CuCaM64-GzjDuoFA@mail.gmail.com' \
    --to=mtk.manpages@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=athorlton@sgi.com \
    --cc=borntraeger@de.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=viro@zeniv.linux.org.uk \
    /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