diff options
author | David Rientjes <rientjes@google.com> | 2008-04-28 05:12:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:20 -0400 |
commit | 3e1f064562fcff7bf3856bc1d00dfa84d4f121cc (patch) | |
tree | 9ebc17449238ab5284b72f634405044376dc816b /Documentation/vm | |
parent | 3842b46de626d1a3c44ad280d67ab0a4dc047d13 (diff) |
mempolicy: disallow static or relative flags for local preferred mode
MPOL_F_STATIC_NODES and MPOL_F_RELATIVE_NODES don't mean anything for
MPOL_PREFERRED policies that were created with an empty nodemask (for purely
local allocations). They'll never be invalidated because the allowed mems of
a task changes or need to be rebound relative to a cpuset's placement.
Also fixes a bug identified by Lee Schermerhorn that disallowed empty
nodemasks to be passed to MPOL_PREFERRED to specify local allocations. [A
different, somewhat incomplete, patch already existed in 25-rc5-mm1.]
Cc: Paul Jackson <pj@sgi.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/vm')
-rw-r--r-- | Documentation/vm/numa_memory_policy.txt | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Documentation/vm/numa_memory_policy.txt b/Documentation/vm/numa_memory_policy.txt index 706410dfb9e5..1c7dd21623d2 100644 --- a/Documentation/vm/numa_memory_policy.txt +++ b/Documentation/vm/numa_memory_policy.txt | |||
@@ -205,6 +205,12 @@ Components of Memory Policies | |||
205 | local allocation for a specific range of addresses--i.e. for | 205 | local allocation for a specific range of addresses--i.e. for |
206 | VMA policies. | 206 | VMA policies. |
207 | 207 | ||
208 | It is possible for the user to specify that local allocation is | ||
209 | always preferred by passing an empty nodemask with this mode. | ||
210 | If an empty nodemask is passed, the policy cannot use the | ||
211 | MPOL_F_STATIC_NODES or MPOL_F_RELATIVE_NODES flags described | ||
212 | below. | ||
213 | |||
208 | MPOL_INTERLEAVED: This mode specifies that page allocations be | 214 | MPOL_INTERLEAVED: This mode specifies that page allocations be |
209 | interleaved, on a page granularity, across the nodes specified in | 215 | interleaved, on a page granularity, across the nodes specified in |
210 | the policy. This mode also behaves slightly differently, based on | 216 | the policy. This mode also behaves slightly differently, based on |
@@ -254,7 +260,10 @@ Components of Memory Policies | |||
254 | occurs over that node. If no nodes from the user's nodemask are | 260 | occurs over that node. If no nodes from the user's nodemask are |
255 | now allowed, the Default behavior is used. | 261 | now allowed, the Default behavior is used. |
256 | 262 | ||
257 | MPOL_F_STATIC_NODES cannot be used with MPOL_F_RELATIVE_NODES. | 263 | MPOL_F_STATIC_NODES cannot be combined with the |
264 | MPOL_F_RELATIVE_NODES flag. It also cannot be used for | ||
265 | MPOL_PREFERRED policies that were created with an empty nodemask | ||
266 | (local allocation). | ||
258 | 267 | ||
259 | MPOL_F_RELATIVE_NODES: This flag specifies that the nodemask passed | 268 | MPOL_F_RELATIVE_NODES: This flag specifies that the nodemask passed |
260 | by the user will be mapped relative to the set of the task or VMA's | 269 | by the user will be mapped relative to the set of the task or VMA's |
@@ -301,7 +310,10 @@ Components of Memory Policies | |||
301 | set of memory nodes allowed by the task's cpuset, as that may | 310 | set of memory nodes allowed by the task's cpuset, as that may |
302 | change over time. | 311 | change over time. |
303 | 312 | ||
304 | MPOL_F_RELATIVE_NODES cannot be used with MPOL_F_STATIC_NODES. | 313 | MPOL_F_RELATIVE_NODES cannot be combined with the |
314 | MPOL_F_STATIC_NODES flag. It also cannot be used for | ||
315 | MPOL_PREFERRED policies that were created with an empty nodemask | ||
316 | (local allocation). | ||
305 | 317 | ||
306 | MEMORY POLICY APIs | 318 | MEMORY POLICY APIs |
307 | 319 | ||