Lines Matching refs:nodes

178 	int (*create)(struct mempolicy *pol, const nodemask_t *nodes);
179 void (*rebind)(struct mempolicy *pol, const nodemask_t *nodes);
195 static int mpol_new_nodemask(struct mempolicy *pol, const nodemask_t *nodes) in mpol_new_nodemask() argument
197 if (nodes_empty(*nodes)) in mpol_new_nodemask()
199 pol->nodes = *nodes; in mpol_new_nodemask()
203 static int mpol_new_preferred(struct mempolicy *pol, const nodemask_t *nodes) in mpol_new_preferred() argument
205 if (nodes_empty(*nodes)) in mpol_new_preferred()
208 nodes_clear(pol->nodes); in mpol_new_preferred()
209 node_set(first_node(*nodes), pol->nodes); in mpol_new_preferred()
222 const nodemask_t *nodes, struct nodemask_scratch *nsc) in mpol_set_nodemask() argument
238 VM_BUG_ON(!nodes); in mpol_set_nodemask()
241 mpol_relative_nodemask(&nsc->mask2, nodes, &nsc->mask1); in mpol_set_nodemask()
243 nodes_and(nsc->mask2, *nodes, nsc->mask1); in mpol_set_nodemask()
246 pol->w.user_nodemask = *nodes; in mpol_set_nodemask()
259 nodemask_t *nodes) in mpol_new() argument
264 mode, flags, nodes ? nodes_addr(*nodes)[0] : NUMA_NO_NODE); in mpol_new()
267 if (nodes && !nodes_empty(*nodes)) in mpol_new()
271 VM_BUG_ON(!nodes); in mpol_new()
279 if (nodes_empty(*nodes)) { in mpol_new()
287 if (!nodes_empty(*nodes) || in mpol_new()
291 } else if (nodes_empty(*nodes)) in mpol_new()
311 static void mpol_rebind_default(struct mempolicy *pol, const nodemask_t *nodes) in mpol_rebind_default() argument
315 static void mpol_rebind_nodemask(struct mempolicy *pol, const nodemask_t *nodes) in mpol_rebind_nodemask() argument
320 nodes_and(tmp, pol->w.user_nodemask, *nodes); in mpol_rebind_nodemask()
322 mpol_relative_nodemask(&tmp, &pol->w.user_nodemask, nodes); in mpol_rebind_nodemask()
324 nodes_remap(tmp, pol->nodes, pol->w.cpuset_mems_allowed, in mpol_rebind_nodemask()
325 *nodes); in mpol_rebind_nodemask()
326 pol->w.cpuset_mems_allowed = *nodes; in mpol_rebind_nodemask()
330 tmp = *nodes; in mpol_rebind_nodemask()
332 pol->nodes = tmp; in mpol_rebind_nodemask()
336 const nodemask_t *nodes) in mpol_rebind_preferred() argument
338 pol->w.cpuset_mems_allowed = *nodes; in mpol_rebind_preferred()
724 nodemask_t *nodes, unsigned long flags, in queue_pages_range() argument
731 .nmask = nodes, in queue_pages_range()
844 nodemask_t *nodes) in do_set_mempolicy() argument
853 new = mpol_new(mode, flags, nodes); in do_set_mempolicy()
859 ret = mpol_set_nodemask(new, nodes, scratch); in do_set_mempolicy()
882 static void get_policy_nodemask(struct mempolicy *p, nodemask_t *nodes) in get_policy_nodemask() argument
884 nodes_clear(*nodes); in get_policy_nodemask()
893 *nodes = p->nodes; in get_policy_nodemask()
981 *policy = next_node_in(current->il_prev, pol->nodes); in do_get_mempolicy()
1379 static int get_nodes(nodemask_t *nodes, const unsigned long __user *nmask, in get_nodes() argument
1383 nodes_clear(*nodes); in get_nodes()
1411 return get_bitmap(nodes_addr(*nodes), nmask, maxnode); in get_nodes()
1416 nodemask_t *nodes) in copy_nodes_to_user() argument
1436 nodes_addr(*nodes), maxnode); in copy_nodes_to_user()
1438 return copy_to_user(mask, nodes_addr(*nodes), copy) ? -EFAULT : 0; in copy_nodes_to_user()
1464 nodemask_t nodes; in kernel_mbind() local
1473 err = get_nodes(&nodes, nmask, maxnode); in kernel_mbind()
1477 return do_mbind(start, len, lmode, mode_flags, &nodes, flags); in kernel_mbind()
1492 nodemask_t nodes; in kernel_set_mempolicy() local
1500 err = get_nodes(&nodes, nmask, maxnode); in kernel_set_mempolicy()
1504 return do_set_mempolicy(lmode, mode_flags, &nodes); in kernel_set_mempolicy()
1618 nodemask_t nodes; in kernel_get_mempolicy() local
1625 err = do_get_mempolicy(&pval, &nodes, addr, flags); in kernel_get_mempolicy()
1634 err = copy_nodes_to_user(nmask, maxnode, &nodes); in kernel_get_mempolicy()
1758 if (!nodes_intersects(policy->nodes, node_states[N_HIGH_MEMORY])) in apply_policy_zone()
1775 cpuset_nodemask_valid_mems_allowed(&policy->nodes)) in policy_nodemask()
1776 return &policy->nodes; in policy_nodemask()
1779 return &policy->nodes; in policy_nodemask()
1794 nd = first_node(policy->nodes); in policy_node()
1813 next = next_node_in(me->il_prev, policy->nodes); in interleave_nodes()
1837 return first_node(policy->nodes); in mempolicy_slab_node()
1855 &policy->nodes); in mempolicy_slab_node()
1873 nodemask_t nodemask = pol->nodes; in offset_il_node()
1950 *nodemask = &(*mpol)->nodes; in huge_node()
1985 *mask = mempolicy->nodes; in init_nodemask_of_mempolicy()
2023 ret = nodes_intersects(mempolicy->nodes, *mask); in mempolicy_in_oom_domain()
2062 page = __alloc_pages(preferred_gfp, order, nid, &pol->nodes); in alloc_pages_preferred_many()
2124 hpage_node = first_node(pol->nodes); in alloc_pages_vma()
2212 int nodes; in alloc_pages_bulk_array_interleave() local
2219 nodes = nodes_weight(pol->nodes); in alloc_pages_bulk_array_interleave()
2220 nr_pages_per_node = nr_pages / nodes; in alloc_pages_bulk_array_interleave()
2221 delta = nr_pages - nodes * nr_pages_per_node; in alloc_pages_bulk_array_interleave()
2223 for (i = 0; i < nodes; i++) { in alloc_pages_bulk_array_interleave()
2253 nr_allocated = __alloc_pages_bulk(preferred_gfp, nid, &pol->nodes, in alloc_pages_bulk_array_preferred_many()
2353 return !!nodes_equal(a->nodes, b->nodes); in __mpol_equal()
2493 if (node_isset(curnid, pol->nodes)) in mpol_misplaced()
2495 polnid = first_node(pol->nodes); in mpol_misplaced()
2505 if (node_isset(thisnid, pol->nodes)) in mpol_misplaced()
2517 if (node_isset(curnid, pol->nodes)) in mpol_misplaced()
2522 &pol->nodes); in mpol_misplaced()
2725 npol ? nodes_addr(npol->nodes)[0] : NUMA_NO_NODE); in mpol_set_shared_policy()
2823 .nodes = nodemask_of_node(nid), in numa_policy_init()
2893 nodemask_t nodes; in mpol_parse_str() local
2904 if (nodelist_parse(nodelist, nodes)) in mpol_parse_str()
2906 if (!nodes_subset(nodes, node_states[N_MEMORY])) in mpol_parse_str()
2909 nodes_clear(nodes); in mpol_parse_str()
2928 if (nodes_empty(nodes)) in mpol_parse_str()
2937 nodes = node_states[N_MEMORY]; in mpol_parse_str()
2976 new = mpol_new(mode, mode_flags, &nodes); in mpol_parse_str()
2985 new->nodes = nodes; in mpol_parse_str()
2987 nodes_clear(new->nodes); in mpol_parse_str()
2988 node_set(first_node(nodes), new->nodes); in mpol_parse_str()
2997 new->w.user_nodemask = nodes; in mpol_parse_str()
3026 nodemask_t nodes = NODE_MASK_NONE; in mpol_to_str() local
3043 nodes = pol->nodes; in mpol_to_str()
3065 if (!nodes_empty(nodes)) in mpol_to_str()
3067 nodemask_pr_args(&nodes)); in mpol_to_str()