5 #ifndef _LINUX_MEMPOLICY_H
6 #define _LINUX_MEMPOLICY_H 1
10 #include <linux/slab.h>
11 #include <linux/rbtree.h>
74 static inline int mpol_needs_cond_ref(
struct mempolicy *pol)
79 static inline void mpol_cond_put(
struct mempolicy *pol)
81 if (mpol_needs_cond_ref(pol))
93 #define vma_policy(vma) ((vma)->vm_policy)
94 #define vma_set_policy(vma, pol) ((vma)->vm_policy = (pol))
96 static inline void mpol_get(
struct mempolicy *pol)
157 static inline void check_highest_zone(
enum zone_type k)
168 extern int mpol_parse_str(
char *
str,
struct mempolicy **mpol,
int no_context);
177 if (vma->
vm_flags & (VM_IO | VM_HUGETLB | VM_PFNMAP))
185 gfp_zone(mapping_gfp_mask(vma->
vm_file->f_mapping))
200 static inline void mpol_put(
struct mempolicy *
p)
204 static inline void mpol_cond_put(
struct mempolicy *pol)
208 static inline void mpol_get(
struct mempolicy *pol)
241 #define vma_policy(vma) NULL
242 #define vma_set_policy(vma, pol) do {} while(0)
272 return node_zonelist(0, gfp_flags);
275 static inline bool init_nodemask_of_mempolicy(
nodemask_t *
m)
292 static inline void check_highest_zone(
int k)
297 static inline int mpol_parse_str(
char *
str,
struct mempolicy **mpol,