]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mempolicy: use N_MEMORY instead N_HIGH_MEMORY
authorLai Jiangshan <laijs@cn.fujitsu.com>
Thu, 29 Nov 2012 03:18:04 +0000 (14:18 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:19 +0000 (16:23 +1100)
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>
mm/mempolicy.c

index 54a698dcbf2b7b80e9a39dd04f835b0257e49a8d..1782b4c53d9cefa96826b06d0a10c8fb623be037 100644 (file)
@@ -230,9 +230,9 @@ static int mpol_set_nodemask(struct mempolicy *pol,
        /* if mode is MPOL_DEFAULT, pol is NULL. This is right. */
        if (pol == NULL)
                return 0;
-       /* Check N_HIGH_MEMORY */
+       /* Check N_MEMORY */
        nodes_and(nsc->mask1,
-                 cpuset_current_mems_allowed, node_states[N_HIGH_MEMORY]);
+                 cpuset_current_mems_allowed, node_states[N_MEMORY]);
 
        VM_BUG_ON(!nodes);
        if (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes))
@@ -1406,7 +1406,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
                goto out_put;
        }
 
-       if (!nodes_subset(*new, node_states[N_HIGH_MEMORY])) {
+       if (!nodes_subset(*new, node_states[N_MEMORY])) {
                err = -EINVAL;
                goto out_put;
        }
@@ -2513,7 +2513,7 @@ void __init numa_policy_init(void)
         * fall back to the largest node if they're all smaller.
         */
        nodes_clear(interleave_nodes);
-       for_each_node_state(nid, N_HIGH_MEMORY) {
+       for_each_node_state(nid, N_MEMORY) {
                unsigned long total_pages = node_present_pages(nid);
 
                /* Preserve the largest node */
@@ -2594,7 +2594,7 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
                *nodelist++ = '\0';
                if (nodelist_parse(nodelist, nodes))
                        goto out;
-               if (!nodes_subset(nodes, node_states[N_HIGH_MEMORY]))
+               if (!nodes_subset(nodes, node_states[N_MEMORY]))
                        goto out;
        } else
                nodes_clear(nodes);
@@ -2628,7 +2628,7 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
                 * Default to online nodes with memory if no nodelist
                 */
                if (!nodelist)
-                       nodes = node_states[N_HIGH_MEMORY];
+                       nodes = node_states[N_MEMORY];
                break;
        case MPOL_LOCAL:
                /*