From 63e28ad443db0958c93805cddc7fd0b06510ca6e Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 8 Aug 2008 19:47:20 +0000 Subject: [PATCH] Lee Schermerhorn Misc cleanup of get_mempolicy(2): + mention that any mode flags will be saved with mode. I don't bother to document mode flags here because we already have a pointer to set_mempolicy(2) for more info on memory policy. mode flags are discussed there. + remove some old, obsolete [IMO] NOTES and 'roff comments. --- man2/get_mempolicy.2 | 46 +++++++++++++------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/man2/get_mempolicy.2 b/man2/get_mempolicy.2 index 3f0c8c1ac..75ced9f75 100644 --- a/man2/get_mempolicy.2 +++ b/man2/get_mempolicy.2 @@ -22,7 +22,7 @@ .\" 2007-08-27, Lee Schermerhorn .\" more precise specification of behavior. .\" -.TH GET_MEMPOLICY 2 2007-08-27 Linux "Linux Programmer's Manual" +.TH GET_MEMPOLICY 2 2008-08-08 Linux "Linux Programmer's Manual" .SH NAME get_mempolicy \- Retrieve NUMA memory policy for a process .SH SYNOPSIS @@ -53,6 +53,15 @@ then information about the calling process's default policy (as set by .BR set_mempolicy (2)) is returned. +The policy returned +.RI [ mode +and +.IR nodemask ] +may be used to restore the process's policy to its state at +the time of the call to +.BR get_mempolicy () +using +.BR set_mempolicy (2). If .I flags @@ -72,8 +81,9 @@ If the .I mode argument is not NULL, then .BR get_mempolicy () -will store the policy mode of the requested NUMA policy in the location -pointed to by this argument. +will store the policy mode and any optional +.I "mode flags" +of the requested NUMA policy in the location pointed to by this argument. If .I nodemask is not NULL, then the nodemask associated with the policy will be stored @@ -188,36 +198,6 @@ cases.) .SH CONFORMING TO This system call is Linux-specific. .SH NOTES -If the mode of the process policy or the policy governing allocations at the -specified address is -.B MPOL_PREFERRED -and this policy was installed with an empty -.IR nodemask \(emspecifying -local allocation, -.BR get_mempolicy () -will return the mask of on-line node IDs in the location pointed to by -a non-NULL -.I nodemask -argument. -This mask does not take into consideration any administratively imposed -restrictions on the process's context. -.\" FIXME -.\" "context" above refers to cpusets. -.\" No man page to reference. --Lee Schermerhorn -.\" -.\" Christoph says the following is untrue. These are "fully supported." -.\" Andi concedes that he has lost this battle and approves [?] -.\" updating the man pages to document the behavior. --Lee Schermerhorn -.\" This manual page is incomplete: -.\" it does not document the details the -.\" .BR MPOL_F_NODE -.\" flag, -.\" which modifies the operation of -.\" .BR get_mempolicy (). -.\" This is deliberate: this flag is not intended for application use, -.\" and its operation may change or it may be removed altogether in -.\" future kernel versions. -.\" .B Do not use it. .SS "Versions and Library Support" See .BR mbind (2).