]> Pileus Git - ~andy/linux/blobdiff - include/linux/mempolicy.h
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / include / linux / mempolicy.h
index 7b9ef6bf45aa3c6648bf344f2fff53335a976820..7978eec1b7d9964420c2e854afba51a8f9cbf8f5 100644 (file)
@@ -199,6 +199,9 @@ void mpol_free_shared_policy(struct shared_policy *p);
 struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp,
                                            unsigned long idx);
 
+struct mempolicy *get_vma_policy(struct task_struct *tsk,
+               struct vm_area_struct *vma, unsigned long addr);
+
 extern void numa_default_policy(void);
 extern void numa_policy_init(void);
 extern void mpol_rebind_task(struct task_struct *tsk, const nodemask_t *new,
@@ -210,6 +213,8 @@ extern struct zonelist *huge_zonelist(struct vm_area_struct *vma,
                                unsigned long addr, gfp_t gfp_flags,
                                struct mempolicy **mpol, nodemask_t **nodemask);
 extern bool init_nodemask_of_mempolicy(nodemask_t *mask);
+extern bool mempolicy_nodemask_intersects(struct task_struct *tsk,
+                               const nodemask_t *mask);
 extern unsigned slab_node(struct mempolicy *policy);
 
 extern enum zone_type policy_zone;
@@ -226,10 +231,10 @@ int do_migrate_pages(struct mm_struct *mm,
 
 #ifdef CONFIG_TMPFS
 extern int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context);
+#endif
 
 extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol,
                        int no_context);
-#endif
 
 /* Check if a vma is migratable */
 static inline int vma_migratable(struct vm_area_struct *vma)
@@ -338,7 +343,16 @@ static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma,
        return node_zonelist(0, gfp_flags);
 }
 
-static inline bool init_nodemask_of_mempolicy(nodemask_t *m) { return false; }
+static inline bool init_nodemask_of_mempolicy(nodemask_t *m)
+{
+       return false;
+}
+
+static inline bool mempolicy_nodemask_intersects(struct task_struct *tsk,
+                       const nodemask_t *mask)
+{
+       return false;
+}
 
 static inline int do_migrate_pages(struct mm_struct *mm,
                        const nodemask_t *from_nodes,
@@ -357,13 +371,13 @@ static inline int mpol_parse_str(char *str, struct mempolicy **mpol,
 {
        return 1;       /* error */
 }
+#endif
 
 static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol,
                                int no_context)
 {
        return 0;
 }
-#endif
 
 #endif /* CONFIG_NUMA */
 #endif /* __KERNEL__ */