diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2 index f5804c204..f45aba143 100644 --- a/man2/set_mempolicy.2 +++ b/man2/set_mempolicy.2 @@ -155,8 +155,11 @@ cpuset context includes one or more of the nodes specified by .IR nodemask . The +.I mode +argument must include one of the following values: +.TP .B MPOL_DEFAULT -mode specifies that any nondefault thread memory policy be removed, +This mode specifies that any nondefault thread memory policy be removed, so that the memory policy "falls back" to the system default policy. The system default policy is "local allocation"\(emthat is, allocate memory on the node of the CPU that triggered the allocation. @@ -164,10 +167,9 @@ allocate memory on the node of the CPU that triggered the allocation. must be specified as NULL. If the "local node" contains no free memory, the system will attempt to allocate memory from a "near by" node. - -The +.TP .B MPOL_BIND -mode defines a strict policy that restricts memory allocation to the +This mode defines a strict policy that restricts memory allocation to the nodes specified in .IR nodemask . If @@ -182,8 +184,9 @@ and so forth, until none of the specified nodes contain free memory. Pages will not be allocated from any node not specified in the .IR nodemask . +.TP .B MPOL_INTERLEAVE -interleaves page allocations across the nodes specified in +This mode interleaves page allocations across the nodes specified in .I nodemask in numeric node ID order. This optimizes for bandwidth instead of latency @@ -195,9 +198,9 @@ the memory bandwidth of a single node. .\" of set_mempolicy() -- no memory area specified. .\" To be effective the memory area should be fairly large, .\" at least 1MB or bigger. - +.TP .B MPOL_PREFERRED -sets the preferred node for allocation. +This mode sets the preferred node for allocation. The kernel will try to allocate pages from this node first and fall back to "near by" nodes if the preferred node is low on free memory. @@ -212,11 +215,11 @@ and arguments specify the empty set, then the policy specifies "local allocation" (like the system default policy discussed above). - +.TP .BR MPOL_LOCAL " (since Linux 3.8)" .\" commit 479e2802d09f1e18a97262c4c6f8f17ae5884bd8 .\" commit f2a07f40dbc603c15f8b06e6ec7f768af67b424f -specifies "local allocation"; the memory is allocated on +This mode specifies "local allocation"; the memory is allocated on the node of the CPU that triggered the allocation (the "local node"). The .I nodemask @@ -231,7 +234,7 @@ If the "local node" is not allowed by the process's current cpuset context, the kernel will try to allocate memory from other nodes. The kernel will allocate memory from the "local node" whenever it becomes allowed by the process's current cpuset context. - +.PP The thread memory policy is preserved across an .BR execve (2), and is inherited by child threads created using