Lines Matching refs:mempolicy
118 static struct mempolicy default_policy = {
124 static struct mempolicy preferred_node_policy[MAX_NUMNODES];
126 struct mempolicy *get_task_policy(struct task_struct *p) in get_task_policy()
128 struct mempolicy *pol = p->mempolicy; in get_task_policy()
146 int (*create)(struct mempolicy *pol, const nodemask_t *nodes);
161 void (*rebind)(struct mempolicy *pol, const nodemask_t *nodes,
165 static inline int mpol_store_user_nodemask(const struct mempolicy *pol) in mpol_store_user_nodemask()
178 static int mpol_new_interleave(struct mempolicy *pol, const nodemask_t *nodes) in mpol_new_interleave()
186 static int mpol_new_preferred(struct mempolicy *pol, const nodemask_t *nodes) in mpol_new_preferred()
197 static int mpol_new_bind(struct mempolicy *pol, const nodemask_t *nodes) in mpol_new_bind()
214 static int mpol_set_nodemask(struct mempolicy *pol, in mpol_set_nodemask()
253 static struct mempolicy *mpol_new(unsigned short mode, unsigned short flags, in mpol_new()
256 struct mempolicy *policy; in mpol_new()
296 void __mpol_put(struct mempolicy *p) in __mpol_put()
303 static void mpol_rebind_default(struct mempolicy *pol, const nodemask_t *nodes, in mpol_rebind_default()
314 static void mpol_rebind_nodemask(struct mempolicy *pol, const nodemask_t *nodes, in mpol_rebind_nodemask()
358 static void mpol_rebind_preferred(struct mempolicy *pol, in mpol_rebind_preferred()
399 static void mpol_rebind_policy(struct mempolicy *pol, const nodemask_t *newmask, in mpol_rebind_policy()
434 mpol_rebind_policy(tsk->mempolicy, new, step); in mpol_rebind_task()
663 struct mempolicy *pol) in vma_replace_policy()
666 struct mempolicy *old; in vma_replace_policy()
667 struct mempolicy *new; in vma_replace_policy()
696 unsigned long end, struct mempolicy *new_pol) in mbind_range()
759 struct mempolicy *new, *old; in do_set_mempolicy()
779 old = current->mempolicy; in do_set_mempolicy()
780 current->mempolicy = new; in do_set_mempolicy()
797 static void get_policy_nodemask(struct mempolicy *p, nodemask_t *nodes) in get_policy_nodemask()
839 struct mempolicy *pol = current->mempolicy; in do_get_mempolicy()
883 } else if (pol == current->mempolicy && in do_get_mempolicy()
1143 struct mempolicy *new; in do_mbind()
1544 struct mempolicy *__get_vma_policy(struct vm_area_struct *vma, in __get_vma_policy()
1547 struct mempolicy *pol = NULL; in __get_vma_policy()
1581 static struct mempolicy *get_vma_policy(struct vm_area_struct *vma, in get_vma_policy()
1584 struct mempolicy *pol = __get_vma_policy(vma, addr); in get_vma_policy()
1594 struct mempolicy *pol; in vma_policy_mof()
1614 static int apply_policy_zone(struct mempolicy *policy, enum zone_type zone) in apply_policy_zone()
1638 static nodemask_t *policy_nodemask(gfp_t gfp, struct mempolicy *policy) in policy_nodemask()
1650 static struct zonelist *policy_zonelist(gfp_t gfp, struct mempolicy *policy, in policy_zonelist()
1676 static unsigned interleave_nodes(struct mempolicy *policy) in interleave_nodes()
1696 struct mempolicy *policy; in mempolicy_slab_node()
1702 policy = current->mempolicy; in mempolicy_slab_node()
1737 static unsigned offset_il_node(struct mempolicy *pol, in offset_il_node()
1757 static inline unsigned interleave_nid(struct mempolicy *pol, in interleave_nid()
1810 gfp_t gfp_flags, struct mempolicy **mpol, in huge_zonelist()
1847 struct mempolicy *mempolicy; in init_nodemask_of_mempolicy() local
1850 if (!(mask && current->mempolicy)) in init_nodemask_of_mempolicy()
1854 mempolicy = current->mempolicy; in init_nodemask_of_mempolicy()
1855 switch (mempolicy->mode) { in init_nodemask_of_mempolicy()
1857 if (mempolicy->flags & MPOL_F_LOCAL) in init_nodemask_of_mempolicy()
1860 nid = mempolicy->v.preferred_node; in init_nodemask_of_mempolicy()
1867 *mask = mempolicy->v.nodes; in init_nodemask_of_mempolicy()
1892 struct mempolicy *mempolicy; in mempolicy_nodemask_intersects() local
1898 mempolicy = tsk->mempolicy; in mempolicy_nodemask_intersects()
1899 if (!mempolicy) in mempolicy_nodemask_intersects()
1902 switch (mempolicy->mode) { in mempolicy_nodemask_intersects()
1913 ret = nodes_intersects(mempolicy->v.nodes, *mask); in mempolicy_nodemask_intersects()
1965 struct mempolicy *pol; in alloc_pages_vma()
2041 struct mempolicy *pol = &default_policy; in alloc_pages_current()
2071 struct mempolicy *pol = mpol_dup(vma_policy(src)); in vma_dup_policy()
2091 struct mempolicy *__mpol_dup(struct mempolicy *old) in __mpol_dup()
2093 struct mempolicy *new = kmem_cache_alloc(policy_cache, GFP_KERNEL); in __mpol_dup()
2099 if (old == current->mempolicy) { in __mpol_dup()
2118 bool __mpol_equal(struct mempolicy *a, struct mempolicy *b) in __mpol_equal()
2209 struct mempolicy *
2212 struct mempolicy *pol = NULL; in mpol_shared_policy_lookup()
2252 struct mempolicy *pol; in mpol_misplaced()
2328 unsigned long end, struct mempolicy *pol) in sp_node_init()
2336 struct mempolicy *pol) in sp_alloc()
2339 struct mempolicy *newpol; in sp_alloc()
2362 struct mempolicy *mpol_new = NULL; in shared_policy_replace()
2432 void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol) in mpol_shared_policy_init()
2441 struct mempolicy *new; in mpol_shared_policy_init()
2472 struct vm_area_struct *vma, struct mempolicy *npol) in mpol_set_shared_policy()
2570 sizeof(struct mempolicy), in numa_policy_init()
2578 preferred_node_policy[nid] = (struct mempolicy) { in numa_policy_init()
2650 int mpol_parse_str(char *str, struct mempolicy **mpol) in mpol_parse_str()
2652 struct mempolicy *new = NULL; in mpol_parse_str()
2783 void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) in mpol_to_str()