Lines Matching refs:nodes

15  * interleave     Allocate memory interleaved over a set of nodes,
23 * Allocate memory interleaved over a set of nodes based on
29 * bind Only allocate memory on a specific set of nodes,
33 * the allocation to memory nodes instead
41 * preferred many Try a set of nodes first before normal fallback. This is
219 int (*create)(struct mempolicy *pol, const nodemask_t *nodes);
220 void (*rebind)(struct mempolicy *pol, const nodemask_t *nodes);
236 static int mpol_new_nodemask(struct mempolicy *pol, const nodemask_t *nodes)
238 if (nodes_empty(*nodes))
240 pol->nodes = *nodes;
244 static int mpol_new_preferred(struct mempolicy *pol, const nodemask_t *nodes)
246 if (nodes_empty(*nodes))
249 nodes_clear(pol->nodes);
250 node_set(first_node(*nodes), pol->nodes);
256 * any, for the new policy. mpol_new() has already validated the nodes
263 const nodemask_t *nodes, struct nodemask_scratch *nsc)
279 VM_BUG_ON(!nodes);
282 mpol_relative_nodemask(&nsc->mask2, nodes, &nsc->mask1);
284 nodes_and(nsc->mask2, *nodes, nsc->mask1);
287 pol->w.user_nodemask = *nodes;
297 * initialization. You must invoke mpol_set_nodemask() to set nodes.
300 nodemask_t *nodes)
305 if (nodes && !nodes_empty(*nodes))
309 VM_BUG_ON(!nodes);
317 if (nodes_empty(*nodes)) {
325 if (!nodes_empty(*nodes) ||
329 } else if (nodes_empty(*nodes))
351 static void mpol_rebind_default(struct mempolicy *pol, const nodemask_t *nodes)
355 static void mpol_rebind_nodemask(struct mempolicy *pol, const nodemask_t *nodes)
360 nodes_and(tmp, pol->w.user_nodemask, *nodes);
362 mpol_relative_nodemask(&tmp, &pol->w.user_nodemask, nodes);
364 nodes_remap(tmp, pol->nodes, pol->w.cpuset_mems_allowed,
365 *nodes);
366 pol->w.cpuset_mems_allowed = *nodes;
370 tmp = *nodes;
372 pol->nodes = tmp;
376 const nodemask_t *nodes)
378 pol->w.cpuset_mems_allowed = *nodes;
382 * mpol_rebind_policy - Migrate a policy to a different set of nodes
722 * Check page nodes, and queue pages to move, in the current vma.
747 * If pages found in a given range are not on the required set of @nodes,
760 nodemask_t *nodes, unsigned long flags,
767 .nmask = nodes,
847 nodemask_t *nodes)
856 new = mpol_new(mode, flags, nodes);
863 ret = mpol_set_nodemask(new, nodes, scratch);
890 static void get_policy_nodemask(struct mempolicy *pol, nodemask_t *nodes)
892 nodes_clear(*nodes);
902 *nodes = pol->nodes;
985 *policy = next_node_in(current->il_prev, pol->nodes);
992 pol->nodes);
1135 * This lets us pick a pair of nodes to migrate between, such that
1164 * However if the number of source nodes is not equal to
1165 * the number of destination nodes we can not preserve
1185 /* dest not in remaining from nodes? */
1353 * targeted nodes, for the first VMA to be migrated; for later
1354 * VMAs, the nodes will still be interleaved from the targeted
1434 static int get_nodes(nodemask_t *nodes, const unsigned long __user *nmask,
1438 nodes_clear(*nodes);
1445 * When the user specified more nodes than supported just check
1466 return get_bitmap(nodes_addr(*nodes), nmask, maxnode);
1471 nodemask_t *nodes)
1491 nodes_addr(*nodes), maxnode);
1493 return copy_to_user(mask, nodes_addr(*nodes), copy) ? -EFAULT : 0;
1519 nodemask_t nodes;
1528 err = get_nodes(&nodes, nmask, maxnode);
1532 return do_mbind(start, len, lmode, mode_flags, &nodes, flags);
1614 nodemask_t nodes;
1622 err = get_nodes(&nodes, nmask, maxnode);
1626 return do_set_mempolicy(lmode, mode_flags, &nodes);
1685 /* Is the user allowed to access the target nodes? */
1738 nodemask_t nodes;
1745 err = do_get_mempolicy(&pval, &nodes, addr, flags);
1754 err = copy_nodes_to_user(nmask, maxnode, &nodes);
1863 * if policy->nodes has movable memory only,
1866 * policy->nodes is intersect with node_states[N_MEMORY].
1868 * policy->nodes has movable memory only.
1870 if (!nodes_intersects(policy->nodes, node_states[N_HIGH_MEMORY]))
1885 if (!current->il_weight || !node_isset(node, policy->nodes)) {
1886 node = next_node_in(node, policy->nodes);
1907 nid = next_node_in(current->il_prev, policy->nodes);
1933 return first_node(policy->nodes);
1954 &policy->nodes);
1974 memcpy(mask, &pol->nodes, sizeof(nodemask_t));
2020 * node in pol->nodes (starting from ilx=0), wrapping around if ilx
2021 * exceeds the number of present nodes.
2041 * Return a nodemask representing a mempolicy for filtering nodes for
2052 *nid = first_node(pol->nodes);
2055 nodemask = &pol->nodes;
2062 cpuset_nodemask_valid_mems_allowed(&pol->nodes))
2063 nodemask = &pol->nodes;
2145 *mask = mempolicy->nodes;
2167 * memory allocated from all nodes in system.
2183 ret = nodes_intersects(mempolicy->nodes, *mask);
2197 * preferred nodes but skip the direct reclaim and allow the
2199 * nodes in system.
2238 * node and don't fall back to other nodes, as the cost of
2350 int nodes;
2357 nodes = nodes_weight(pol->nodes);
2358 nr_pages_per_node = nr_pages / nodes;
2359 delta = nr_pages - nodes * nr_pages_per_node;
2361 for (i = 0; i < nodes; i++) {
2394 nodemask_t nodes;
2404 /* read the nodes onto the stack, retry if done during rebind */
2407 nnodes = read_once_policy_nodemask(pol, &nodes);
2417 if (weight && node_isset(node, nodes)) {
2447 for_each_node_mask(node, nodes) {
2462 resume_node = next_node_in(prev_node, nodes);
2465 node = next_node_in(prev_node, nodes);
2506 nr_allocated = __alloc_pages_bulk(preferred_gfp, nid, &pol->nodes,
2616 return !!nodes_equal(a->nodes, b->nodes);
2757 if (node_isset(curnid, pol->nodes))
2759 polnid = first_node(pol->nodes);
2767 /* Optimize placement among multiple nodes via NUMA balancing */
2769 if (node_isset(thisnid, pol->nodes))
2779 * If no allowed nodes, use current [!misplaced].
2781 if (node_isset(curnid, pol->nodes))
2786 &pol->nodes);
3081 .nodes = nodemask_of_node(nid),
3087 * enabled across suitably sized nodes (default is >= 16MB), or
3150 nodemask_t nodes;
3161 if (nodelist_parse(nodelist, nodes))
3163 if (!nodes_subset(nodes, node_states[N_MEMORY]))
3166 nodes_clear(nodes);
3176 * we use first_node(nodes) to grab a single node, so here
3177 * nodelist (or nodes) cannot be empty.
3185 if (nodes_empty(nodes))
3192 * Default to online nodes with memory if no nodelist
3195 nodes = node_states[N_MEMORY];
3234 new = mpol_new(mode, mode_flags, &nodes);
3239 * Save nodes for mpol_to_str() to show the tmpfs mount options
3243 new->nodes = nodes;
3245 nodes_clear(new->nodes);
3246 node_set(first_node(nodes), new->nodes);
3252 * Save nodes for contextualization: this will be used to "clone"
3255 new->w.user_nodemask = nodes;
3284 nodemask_t nodes = NODE_MASK_NONE;
3302 nodes = pol->nodes;
3324 if (!nodes_empty(nodes))
3326 nodemask_pr_args(&nodes));