Lines Matching refs:mempolicy

126 static struct mempolicy default_policy = {
131 static struct mempolicy preferred_node_policy[MAX_NUMNODES];
161 struct mempolicy *get_task_policy(struct task_struct *p) in get_task_policy()
163 struct mempolicy *pol = p->mempolicy; in get_task_policy()
181 int (*create)(struct mempolicy *pol, const nodemask_t *nodes);
182 void (*rebind)(struct mempolicy *pol, const nodemask_t *nodes);
185 static inline int mpol_store_user_nodemask(const struct mempolicy *pol) in mpol_store_user_nodemask()
198 static int mpol_new_nodemask(struct mempolicy *pol, const nodemask_t *nodes) in mpol_new_nodemask()
206 static int mpol_new_preferred(struct mempolicy *pol, const nodemask_t *nodes) in mpol_new_preferred()
224 static int mpol_set_nodemask(struct mempolicy *pol, in mpol_set_nodemask()
261 static struct mempolicy *mpol_new(unsigned short mode, unsigned short flags, in mpol_new()
264 struct mempolicy *policy; in mpol_new()
308 void __mpol_put(struct mempolicy *p) in __mpol_put()
315 static void mpol_rebind_default(struct mempolicy *pol, const nodemask_t *nodes) in mpol_rebind_default()
319 static void mpol_rebind_nodemask(struct mempolicy *pol, const nodemask_t *nodes) in mpol_rebind_nodemask()
339 static void mpol_rebind_preferred(struct mempolicy *pol, in mpol_rebind_preferred()
352 static void mpol_rebind_policy(struct mempolicy *pol, const nodemask_t *newmask) in mpol_rebind_policy()
372 mpol_rebind_policy(tsk->mempolicy, new); in mpol_rebind_task()
776 struct mempolicy *pol) in vma_replace_policy()
779 struct mempolicy *old; in vma_replace_policy()
780 struct mempolicy *new; in vma_replace_policy()
812 unsigned long end, struct mempolicy *new_pol) in mbind_range()
861 struct mempolicy *new, *old; in do_set_mempolicy()
882 old = current->mempolicy; in do_set_mempolicy()
883 current->mempolicy = new; in do_set_mempolicy()
899 static void get_policy_nodemask(struct mempolicy *p, nodemask_t *nodes) in get_policy_nodemask()
940 struct mempolicy *pol = current->mempolicy, *pol_refcount = NULL; in do_get_mempolicy()
993 } else if (pol == current->mempolicy && in do_get_mempolicy()
1268 struct mempolicy *new; in do_mbind()
1509 struct mempolicy *new, *old; in SYSCALL_DEFINE4()
1765 struct mempolicy *__get_vma_policy(struct vm_area_struct *vma, in __get_vma_policy()
1768 struct mempolicy *pol = NULL; in __get_vma_policy()
1802 static struct mempolicy *get_vma_policy(struct vm_area_struct *vma, in get_vma_policy()
1805 struct mempolicy *pol = __get_vma_policy(vma, addr); in get_vma_policy()
1815 struct mempolicy *pol; in vma_policy_mof()
1835 bool apply_policy_zone(struct mempolicy *policy, enum zone_type zone) in apply_policy_zone()
1859 nodemask_t *policy_nodemask(gfp_t gfp, struct mempolicy *policy) in policy_nodemask()
1882 static int policy_node(gfp_t gfp, struct mempolicy *policy, int nd) in policy_node()
1904 static unsigned interleave_nodes(struct mempolicy *policy) in interleave_nodes()
1921 struct mempolicy *policy; in mempolicy_slab_node()
1927 policy = current->mempolicy; in mempolicy_slab_node()
1967 static unsigned offset_il_node(struct mempolicy *pol, unsigned long n) in offset_il_node()
1993 static inline unsigned interleave_nid(struct mempolicy *pol, in interleave_nid()
2031 struct mempolicy **mpol, nodemask_t **nodemask) in huge_node()
2069 struct mempolicy *mempolicy; in init_nodemask_of_mempolicy() local
2071 if (!(mask && current->mempolicy)) in init_nodemask_of_mempolicy()
2075 mempolicy = current->mempolicy; in init_nodemask_of_mempolicy()
2076 switch (mempolicy->mode) { in init_nodemask_of_mempolicy()
2081 *mask = mempolicy->nodes; in init_nodemask_of_mempolicy()
2110 struct mempolicy *mempolicy; in mempolicy_in_oom_domain() local
2117 mempolicy = tsk->mempolicy; in mempolicy_in_oom_domain()
2118 if (mempolicy && mempolicy->mode == MPOL_BIND) in mempolicy_in_oom_domain()
2119 ret = nodes_intersects(mempolicy->nodes, *mask); in mempolicy_in_oom_domain()
2145 int nid, struct mempolicy *pol) in alloc_pages_preferred_many()
2183 struct mempolicy *pol; in vma_alloc_folio()
2283 struct mempolicy *pol = &default_policy; in alloc_pages()
2319 struct mempolicy *pol, unsigned long nr_pages, in alloc_pages_bulk_array_interleave()
2354 struct mempolicy *pol, unsigned long nr_pages, in alloc_pages_bulk_array_preferred_many()
2382 struct mempolicy *pol = &default_policy; in alloc_pages_bulk_array_mempolicy()
2402 struct mempolicy *pol = mpol_dup(vma_policy(src)); in vma_dup_policy()
2422 struct mempolicy *__mpol_dup(struct mempolicy *old) in __mpol_dup()
2424 struct mempolicy *new = kmem_cache_alloc(policy_cache, GFP_KERNEL); in __mpol_dup()
2430 if (old == current->mempolicy) { in __mpol_dup()
2446 bool __mpol_equal(struct mempolicy *a, struct mempolicy *b) in __mpol_equal()
2544 struct mempolicy *
2547 struct mempolicy *pol = NULL; in mpol_shared_policy_lookup()
2584 struct mempolicy *pol; in mpol_misplaced()
2666 struct mempolicy *pol; in mpol_put_task_policy()
2669 pol = task->mempolicy; in mpol_put_task_policy()
2670 task->mempolicy = NULL; in mpol_put_task_policy()
2683 unsigned long end, struct mempolicy *pol) in sp_node_init()
2691 struct mempolicy *pol) in sp_alloc()
2694 struct mempolicy *newpol; in sp_alloc()
2717 struct mempolicy *mpol_new = NULL; in shared_policy_replace()
2788 void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol) in mpol_shared_policy_init()
2797 struct mempolicy *new; in mpol_shared_policy_init()
2828 struct vm_area_struct *vma, struct mempolicy *npol) in mpol_set_shared_policy()
2924 sizeof(struct mempolicy), in numa_policy_init()
2932 preferred_node_policy[nid] = (struct mempolicy) { in numa_policy_init()
3002 int mpol_parse_str(char *str, struct mempolicy **mpol) in mpol_parse_str()
3004 struct mempolicy *new = NULL; in mpol_parse_str()
3136 void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) in mpol_to_str()