mirror of https://github.com/mkerrisk/man-pages
Minor edits.
This commit is contained in:
parent
05c7d833f8
commit
00045cbb7e
|
@ -22,7 +22,7 @@
|
|||
.\" 2007-08-27, Lee Schermerhorn <Lee.Schermerhorn@hp.com>
|
||||
.\" more precise specification of behavior.
|
||||
.\"
|
||||
.TH GET_MEMPOLICY 2 2007-08-27 "Linux" "Linux Programmer's Manual"
|
||||
.TH GET_MEMPOLICY 2 2007-08-27 Linux "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
get_mempolicy \- Retrieve NUMA memory policy for a process
|
||||
.SH SYNOPSIS
|
||||
|
@ -33,7 +33,7 @@ get_mempolicy \- Retrieve NUMA memory policy for a process
|
|||
.BI " unsigned long " maxnode ", unsigned long " addr ,
|
||||
.BI " unsigned long " flags );
|
||||
.sp
|
||||
.BI "cc ... \-lnuma"
|
||||
Link with \fI\-lnuma\fP
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.BR get_mempolicy ()
|
||||
|
@ -64,7 +64,7 @@ address given in
|
|||
This policy may be different from the process's default policy if
|
||||
.BR mbind (2)
|
||||
or one of the helper functions described in
|
||||
.BR numa(3)
|
||||
.BR numa (3)
|
||||
has been used to establish a policy for the memory range containing
|
||||
.IR addr .
|
||||
|
||||
|
@ -79,10 +79,10 @@ If
|
|||
is not NULL, then the nodemask associated with the policy will be stored
|
||||
in the location pointed to by this argument.
|
||||
.I maxnode
|
||||
specifies the number of node ids
|
||||
specifies the number of node IDs
|
||||
that can be stored into
|
||||
.IR nodemask \(emthat
|
||||
is, the maximum node id plus one.
|
||||
is, the maximum node ID plus one.
|
||||
The value specified by
|
||||
.I maxnode
|
||||
is always rounded to a multiple of
|
||||
|
@ -95,14 +95,14 @@ specifies both
|
|||
and
|
||||
.BR MPOL_F_ADDR ,
|
||||
.IR get_mempolicy ()
|
||||
will return the node id of the node on which the address
|
||||
will return the node ID of the node on which the address
|
||||
.I addr
|
||||
is allocated into the location pointed to by
|
||||
.IR mode .
|
||||
If no page has yet been allocated for the specified address,
|
||||
.IR get_mempolicy ()
|
||||
will allocate a page as if the process had performed a read
|
||||
[load] access to that address, and return the id of the node
|
||||
[load] access to that address, and return the ID of the node
|
||||
where that page was allocated.
|
||||
|
||||
If
|
||||
|
@ -118,16 +118,16 @@ then
|
|||
will return in the location pointed to by a non-NULL
|
||||
.I mode
|
||||
argument,
|
||||
the node id of the next node that will be used for
|
||||
the node ID of the next node that will be used for
|
||||
interleaving of internal kernel pages allocated on behalf of the process.
|
||||
.\" Note: code returns next interleave node via 'mode' argument -lts
|
||||
.\" Note: code returns next interleave node via 'mode' argument -Lee Schermerhorn
|
||||
These allocations include pages for memory mapped files in
|
||||
process memory ranges mapped using the
|
||||
.IR mmap (2)
|
||||
call with the
|
||||
.I MAP_PRIVATE
|
||||
.B MAP_PRIVATE
|
||||
flag for read accesses, and in memory ranges mapped with the
|
||||
.I MAP_SHARED
|
||||
.B MAP_SHARED
|
||||
flag for all accesses.
|
||||
|
||||
Other flag values are reserved.
|
||||
|
@ -146,7 +146,7 @@ is set to indicate the error.
|
|||
.B EINVAL
|
||||
The value specified by
|
||||
.I maxnode
|
||||
is less than the number of node ids supported by the system.
|
||||
is less than the number of node IDs supported by the system.
|
||||
Or
|
||||
.I flags
|
||||
specified values other than
|
||||
|
@ -186,23 +186,24 @@ points outside your accessible address space.
|
|||
.SH NOTES
|
||||
If the mode of the process policy or the policy governing allocations at the
|
||||
specified address is
|
||||
.I MPOL_PREFERRED
|
||||
.B MPOL_PREFERRED
|
||||
and this policy was installed with an empty
|
||||
.IR nodemask \(emspecifying
|
||||
local allocation,
|
||||
.IR get_mempolicy ()
|
||||
will return the mask of on-line node ids in the location pointed to by
|
||||
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 adminstratively imposed
|
||||
restrictions on the process' context.
|
||||
restrictions on the process's context.
|
||||
.\" FIXME:
|
||||
.\" "context" above refers to cpusets. No man page to reference. --lts
|
||||
|
||||
.\" "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. --lts
|
||||
.\" 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
|
||||
|
|
34
man2/mbind.2
34
man2/mbind.2
|
@ -22,7 +22,7 @@
|
|||
.\" 2007-08-27, Lee Schermerhorn <Lee.Schermerhorn@hp.com>
|
||||
.\" more precise specification of behavior.
|
||||
.\"
|
||||
.TH MBIND 2 "2007-06-01" Linux "Linux Programmer's Manual"
|
||||
.TH MBIND 2 "2007-08-27" Linux "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
mbind \- Set memory policy for a memory range
|
||||
.SH SYNOPSIS
|
||||
|
@ -33,7 +33,7 @@ mbind \- Set memory policy for a memory range
|
|||
.BI " unsigned long *" nodemask ", unsigned long " maxnode ,
|
||||
.BI " unsigned " flags );
|
||||
.sp
|
||||
.BI "cc ... \-lnuma"
|
||||
Link with \fI\-lnuma\fP
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.BR mbind ()
|
||||
|
@ -169,10 +169,10 @@ the nodes specified in
|
|||
If
|
||||
.I nodemask
|
||||
specifies more than one node, page allocations will come from
|
||||
the node with the lowest numeric node id first, until that node
|
||||
the node with the lowest numeric node ID first, until that node
|
||||
contains no free memory.
|
||||
Allocations will then come from the node with the next highest
|
||||
node id specified in
|
||||
node ID specified in
|
||||
.I nodemask
|
||||
and so forth, until none of the specified nodes contain free memory.
|
||||
Pages will not be allocated from any node not specified in the
|
||||
|
@ -198,7 +198,7 @@ node first and fall back to other nodes if the
|
|||
preferred nodes is low on free memory.
|
||||
If
|
||||
.I nodemask
|
||||
specifies more than one node id, the first node in the
|
||||
specifies more than one node ID, the first node in the
|
||||
mask will be selected as the preferred node.
|
||||
If the
|
||||
.I nodemask
|
||||
|
@ -221,7 +221,8 @@ is not
|
|||
then the call will fail with the error
|
||||
.B EIO
|
||||
if the existing pages in the memory range don't follow the policy.
|
||||
.\" According to the kernel code, the following is not true --lts
|
||||
.\" According to the kernel code, the following is not true
|
||||
.\" --Lee Schermerhorn
|
||||
.\" In 2.6.16 or later the kernel will also try to move pages
|
||||
.\" to the requested node with this flag.
|
||||
|
||||
|
@ -262,7 +263,7 @@ on error, \-1 is returned and
|
|||
is set to indicate the error.
|
||||
.\" ---------------------------------------------------------------
|
||||
.SH ERRORS
|
||||
.\" I think I got all of the error returns. --lts
|
||||
.\" I think I got all of the error returns. --Lee Schermerhorn
|
||||
.TP
|
||||
.B EINVAL
|
||||
An invalid value was specified for
|
||||
|
@ -279,16 +280,16 @@ is not a multiple of the system page size.
|
|||
Or,
|
||||
.I mode
|
||||
is
|
||||
.I MPOL_DEFAULT
|
||||
.B MPOL_DEFAULT
|
||||
and
|
||||
.I nodemask
|
||||
specified a non-empty set;
|
||||
or
|
||||
.I mode
|
||||
is
|
||||
.I MPOL_BIND
|
||||
.B MPOL_BIND
|
||||
or
|
||||
.I MPOL_INTERLEAVE
|
||||
.B MPOL_INTERLEAVE
|
||||
and
|
||||
.I nodemask
|
||||
is empty.
|
||||
|
@ -297,11 +298,12 @@ Or,
|
|||
specifies more than a page worth of bits.
|
||||
Or,
|
||||
.I nodemask
|
||||
specifies one or more node ids that are
|
||||
greater than the maximum supported node id,
|
||||
specifies one or more node IDs that are
|
||||
greater than the maximum supported node ID,
|
||||
or are not allowed in the calling task's context.
|
||||
.\" "calling task's context" refers to cpusets. No man page avail to ref. --lts
|
||||
Or, none of the node ids specified by
|
||||
.\" "calling task's context" refers to cpusets.
|
||||
.\" No man page avail to ref. --Lee Schermerhorn
|
||||
Or, none of the node IDs specified by
|
||||
.I nodemask
|
||||
are on-line, or none of the specified nodes contain memory.
|
||||
.TP
|
||||
|
@ -339,7 +341,7 @@ privilege.
|
|||
.SH NOTES
|
||||
NUMA policy is not supported on a memory mapped file range
|
||||
that was mapped with the
|
||||
.I MAP_SHARED
|
||||
.B MAP_SHARED
|
||||
flag.
|
||||
|
||||
.B MPOL_MF_STRICT
|
||||
|
@ -356,7 +358,7 @@ When
|
|||
is specified for a range of memory using
|
||||
.BR mbind (),
|
||||
any pages subsequently allocated for that range will use
|
||||
the process' policy, as set by
|
||||
the process's policy, as set by
|
||||
.BR set_mempolicy (2).
|
||||
This effectively removes the explicit policy from the
|
||||
specified range.
|
||||
|
|
|
@ -19,9 +19,10 @@
|
|||
.\" the source, must acknowledge the copyright and authors of this work.
|
||||
.\"
|
||||
.\" 2006-02-03, mtk, substantial wording changes and other improvements
|
||||
.\" 2007-06-01, lts, more precise specification of behavior.
|
||||
.\" 2007-08-27, Lee Schermerhorn <Lee.Schermerhorn@hp.com>
|
||||
.\" more precise specification of behavior.
|
||||
.\"
|
||||
.TH SET_MEMPOLICY 2 2006-02-07 Linux "Linux Programmer's Manual"
|
||||
.TH SET_MEMPOLICY 2 2007-08-27 Linux "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
set_mempolicy \- set default NUMA memory policy for a process and its children
|
||||
.SH SYNOPSIS
|
||||
|
@ -31,7 +32,7 @@ set_mempolicy \- set default NUMA memory policy for a process and its children
|
|||
.BI "int set_mempolicy(int " mode ", unsigned long *" nodemask ,
|
||||
.BI " unsigned long " maxnode );
|
||||
.sp
|
||||
.BI "cc ... \-lnuma"
|
||||
Link with \fI\-lnuma\fP
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.BR set_mempolicy ()
|
||||
|
@ -86,7 +87,7 @@ parameter
|
|||
one or more nodes.
|
||||
|
||||
.I nodemask
|
||||
points to a bit mask of node ids that contains up to
|
||||
points to a bit mask of node IDs that contains up to
|
||||
.I maxnode
|
||||
bits.
|
||||
The bit mask size is rounded to the next multiple of
|
||||
|
@ -122,10 +123,10 @@ nodes specified in
|
|||
If
|
||||
.I nodemask
|
||||
specifies more than one node, page allocations will come from
|
||||
the node with the lowest numeric node id first, until that node
|
||||
the node with the lowest numeric node ID first, until that node
|
||||
contains no free memory.
|
||||
Allocations will then come from the node with the next highest
|
||||
node id specified in
|
||||
node ID specified in
|
||||
.I nodemask
|
||||
and so forth, until none of the specified nodes contain free memory.
|
||||
Pages will not be allocated from any node not specified in the
|
||||
|
@ -134,7 +135,7 @@ Pages will not be allocated from any node not specified in the
|
|||
.B MPOL_INTERLEAVE
|
||||
interleaves page allocations across the nodes specified in
|
||||
.I nodemask
|
||||
in numeric node id order.
|
||||
in numeric node ID order.
|
||||
This optimizes for bandwidth instead of latency
|
||||
by spreading out pages and memory accesses to those pages across
|
||||
multiple nodes.
|
||||
|
@ -152,7 +153,7 @@ and fall back to "near by" nodes if the preferred node is low on free
|
|||
memory.
|
||||
If
|
||||
.I nodemask
|
||||
specifies more than one node id, the first node in the
|
||||
specifies more than one node ID, the first node in the
|
||||
mask will be selected as the preferred node.
|
||||
If the
|
||||
.I nodemask
|
||||
|
@ -182,16 +183,16 @@ is set to indicate the error.
|
|||
Or,
|
||||
.I mode
|
||||
is
|
||||
.I MPOL_DEFAULT
|
||||
.B MPOL_DEFAULT
|
||||
and
|
||||
.I nodemask
|
||||
is non-empty,
|
||||
or
|
||||
.I mode
|
||||
is
|
||||
.I MPOL_BIND
|
||||
.B MPOL_BIND
|
||||
or
|
||||
.I MPOL_INTERLEAVE
|
||||
.B MPOL_INTERLEAVE
|
||||
and
|
||||
.I nodemask
|
||||
is empty.
|
||||
|
@ -200,11 +201,12 @@ Or,
|
|||
specifies more than a page worth of bits.
|
||||
Or,
|
||||
.I nodemask
|
||||
specifies one or more node ids that are
|
||||
greater than the maximum supported node id,
|
||||
specifies one or more node IDs that are
|
||||
greater than the maximum supported node ID,
|
||||
or are not allowed in the calling task's context.
|
||||
.\" "calling task's context" refers to cpusets. No man page avail to ref. --lts
|
||||
Or, none of the node ids specified by
|
||||
.\" "calling task's context" refers to cpusets.
|
||||
.\" No man page avail to ref. --Lee Schermerhorn
|
||||
Or, none of the node IDs specified by
|
||||
.I nodemask
|
||||
are on-line, or none of the specified nodes contain memory.
|
||||
.TP
|
||||
|
@ -217,7 +219,6 @@ points outside your accessible address space.
|
|||
.TP
|
||||
.B ENOMEM
|
||||
Insufficient kernel memory was available.
|
||||
|
||||
.SH CONFORMING TO
|
||||
This system call is Linux specific.
|
||||
.SH NOTES
|
||||
|
|
Loading…
Reference in New Issue