diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2012-12-12 16:51:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 20:38:33 -0500 |
commit | 01f13bd607346afa8911ac180588244698676e5c (patch) | |
tree | f6f29f70b5312732fa9ab139e64901b41494ad54 /mm | |
parent | 389162c22dc373932089ce16cbab43e80a88b035 (diff) |
mempolicy: use N_MEMORY instead N_HIGH_MEMORY
N_HIGH_MEMORY stands for the nodes that has normal or high memory.
N_MEMORY stands for the nodes that has any memory.
The code here need to handle with the nodes which have memory, we should
use N_MEMORY instead.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Lin Feng <linfeng@cn.fujitsu.com>
Cc: 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 'mm')
-rw-r--r-- | mm/mempolicy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 0719e8dd4945..aaf54566cb6b 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -212,9 +212,9 @@ static int mpol_set_nodemask(struct mempolicy *pol, | |||
212 | /* if mode is MPOL_DEFAULT, pol is NULL. This is right. */ | 212 | /* if mode is MPOL_DEFAULT, pol is NULL. This is right. */ |
213 | if (pol == NULL) | 213 | if (pol == NULL) |
214 | return 0; | 214 | return 0; |
215 | /* Check N_HIGH_MEMORY */ | 215 | /* Check N_MEMORY */ |
216 | nodes_and(nsc->mask1, | 216 | nodes_and(nsc->mask1, |
217 | cpuset_current_mems_allowed, node_states[N_HIGH_MEMORY]); | 217 | cpuset_current_mems_allowed, node_states[N_MEMORY]); |
218 | 218 | ||
219 | VM_BUG_ON(!nodes); | 219 | VM_BUG_ON(!nodes); |
220 | if (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes)) | 220 | if (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes)) |
@@ -1388,7 +1388,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode, | |||
1388 | goto out_put; | 1388 | goto out_put; |
1389 | } | 1389 | } |
1390 | 1390 | ||
1391 | if (!nodes_subset(*new, node_states[N_HIGH_MEMORY])) { | 1391 | if (!nodes_subset(*new, node_states[N_MEMORY])) { |
1392 | err = -EINVAL; | 1392 | err = -EINVAL; |
1393 | goto out_put; | 1393 | goto out_put; |
1394 | } | 1394 | } |
@@ -2326,7 +2326,7 @@ void __init numa_policy_init(void) | |||
2326 | * fall back to the largest node if they're all smaller. | 2326 | * fall back to the largest node if they're all smaller. |
2327 | */ | 2327 | */ |
2328 | nodes_clear(interleave_nodes); | 2328 | nodes_clear(interleave_nodes); |
2329 | for_each_node_state(nid, N_HIGH_MEMORY) { | 2329 | for_each_node_state(nid, N_MEMORY) { |
2330 | unsigned long total_pages = node_present_pages(nid); | 2330 | unsigned long total_pages = node_present_pages(nid); |
2331 | 2331 | ||
2332 | /* Preserve the largest node */ | 2332 | /* Preserve the largest node */ |
@@ -2407,7 +2407,7 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2407 | *nodelist++ = '\0'; | 2407 | *nodelist++ = '\0'; |
2408 | if (nodelist_parse(nodelist, nodes)) | 2408 | if (nodelist_parse(nodelist, nodes)) |
2409 | goto out; | 2409 | goto out; |
2410 | if (!nodes_subset(nodes, node_states[N_HIGH_MEMORY])) | 2410 | if (!nodes_subset(nodes, node_states[N_MEMORY])) |
2411 | goto out; | 2411 | goto out; |
2412 | } else | 2412 | } else |
2413 | nodes_clear(nodes); | 2413 | nodes_clear(nodes); |
@@ -2441,7 +2441,7 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2441 | * Default to online nodes with memory if no nodelist | 2441 | * Default to online nodes with memory if no nodelist |
2442 | */ | 2442 | */ |
2443 | if (!nodelist) | 2443 | if (!nodelist) |
2444 | nodes = node_states[N_HIGH_MEMORY]; | 2444 | nodes = node_states[N_MEMORY]; |
2445 | break; | 2445 | break; |
2446 | case MPOL_LOCAL: | 2446 | case MPOL_LOCAL: |
2447 | /* | 2447 | /* |