Merge commit 'v2.6.26-rc9' into x86/cpu
[pandora-kernel.git] / include / linux / mm.h
index bc0ad24..586a943 100644 (file)
@@ -172,7 +172,25 @@ struct vm_operations_struct {
         * writable, if an error is returned it will cause a SIGBUS */
        int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
 #ifdef CONFIG_NUMA
+       /*
+        * set_policy() op must add a reference to any non-NULL @new mempolicy
+        * to hold the policy upon return.  Caller should pass NULL @new to
+        * remove a policy and fall back to surrounding context--i.e. do not
+        * install a MPOL_DEFAULT policy, nor the task or system default
+        * mempolicy.
+        */
        int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new);
+
+       /*
+        * get_policy() op must add reference [mpol_get()] to any policy at
+        * (vma,addr) marked as MPOL_SHARED.  The shared policy infrastructure
+        * in mm/mempolicy.c will do this automatically.
+        * get_policy() must NOT add a ref if the policy at (vma,addr) is not
+        * marked as MPOL_SHARED. vma policies are protected by the mmap_sem.
+        * If no [shared/vma] mempolicy exists at the addr, get_policy() op
+        * must return NULL--i.e., do not "fallback" to task or system default
+        * policy.
+        */
        struct mempolicy *(*get_policy)(struct vm_area_struct *vma,
                                        unsigned long addr);
        int (*migrate)(struct vm_area_struct *vma, const nodemask_t *from,
@@ -742,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb,
  * (see walk_page_range for more details)
  */
 struct mm_walk {
-       int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *);
-       int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *);
-       int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *);
-       int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *);
-       int (*pte_hole)(unsigned long, unsigned long, void *);
+       int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *);
+       int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *);
+       int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *);
+       int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *);
+       int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *);
+       struct mm_struct *mm;
+       void *private;
 };
 
-int walk_page_range(const struct mm_struct *, unsigned long addr,
-                   unsigned long end, const struct mm_walk *walk,
-                   void *private);
+int walk_page_range(unsigned long addr, unsigned long end,
+               struct mm_walk *walk);
 void free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
                unsigned long end, unsigned long floor, unsigned long ceiling);
 void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma,
@@ -1048,6 +1067,19 @@ extern void unlink_file_vma(struct vm_area_struct *);
 extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
        unsigned long addr, unsigned long len, pgoff_t pgoff);
 extern void exit_mmap(struct mm_struct *);
+
+#ifdef CONFIG_PROC_FS
+/* From fs/proc/base.c. callers must _not_ hold the mm's exe_file_lock */
+extern void added_exe_file_vma(struct mm_struct *mm);
+extern void removed_exe_file_vma(struct mm_struct *mm);
+#else
+static inline void added_exe_file_vma(struct mm_struct *mm)
+{}
+
+static inline void removed_exe_file_vma(struct mm_struct *mm)
+{}
+#endif /* CONFIG_PROC_FS */
+
 extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
 extern int install_special_mapping(struct mm_struct *mm,
                                   unsigned long addr, unsigned long len,
@@ -1212,8 +1244,6 @@ int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
                                        void __user *, size_t *, loff_t *);
 unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
                        unsigned long lru_pages);
-void drop_pagecache(void);
-void drop_slab(void);
 
 #ifndef CONFIG_MMU
 #define randomize_va_space 0