diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index ad613ed66ab0..d88d6fc530ad 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | #include <linux/gfp.h> | 8 | #include <linux/gfp.h> |
9 | #include <linux/list.h> | 9 | #include <linux/list.h> |
10 | #include <linux/mmdebug.h> | ||
11 | #include <linux/mmzone.h> | 10 | #include <linux/mmzone.h> |
12 | #include <linux/rbtree.h> | 11 | #include <linux/rbtree.h> |
13 | #include <linux/prio_tree.h> | 12 | #include <linux/prio_tree.h> |
@@ -725,7 +724,7 @@ static inline int shmem_lock(struct file *file, int lock, | |||
725 | return 0; | 724 | return 0; |
726 | } | 725 | } |
727 | #endif | 726 | #endif |
728 | struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); | 727 | struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); |
729 | 728 | ||
730 | int shmem_zero_setup(struct vm_area_struct *); | 729 | int shmem_zero_setup(struct vm_area_struct *); |
731 | 730 | ||
@@ -793,6 +792,8 @@ int copy_page_range(struct mm_struct *dst, struct mm_struct *src, | |||
793 | struct vm_area_struct *vma); | 792 | struct vm_area_struct *vma); |
794 | void unmap_mapping_range(struct address_space *mapping, | 793 | void unmap_mapping_range(struct address_space *mapping, |
795 | loff_t const holebegin, loff_t const holelen, int even_cows); | 794 | loff_t const holebegin, loff_t const holelen, int even_cows); |
795 | int follow_pfn(struct vm_area_struct *vma, unsigned long address, | ||
796 | unsigned long *pfn); | ||
796 | int follow_phys(struct vm_area_struct *vma, unsigned long address, | 797 | int follow_phys(struct vm_area_struct *vma, unsigned long address, |
797 | unsigned int flags, unsigned long *prot, resource_size_t *phys); | 798 | unsigned int flags, unsigned long *prot, resource_size_t *phys); |
798 | int generic_access_phys(struct vm_area_struct *vma, unsigned long addr, | 799 | int generic_access_phys(struct vm_area_struct *vma, unsigned long addr, |
@@ -824,8 +825,11 @@ static inline int handle_mm_fault(struct mm_struct *mm, | |||
824 | extern int make_pages_present(unsigned long addr, unsigned long end); | 825 | extern int make_pages_present(unsigned long addr, unsigned long end); |
825 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); | 826 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); |
826 | 827 | ||
827 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, | 828 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, |
828 | int len, int write, int force, struct page **pages, struct vm_area_struct **vmas); | 829 | unsigned long start, int len, int write, int force, |
830 | struct page **pages, struct vm_area_struct **vmas); | ||
831 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | ||
832 | struct page **pages); | ||
829 | 833 | ||
830 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | 834 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); |
831 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 835 | extern void do_invalidatepage(struct page *page, unsigned long offset); |
@@ -850,19 +854,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma, | |||
850 | unsigned long end, unsigned long newflags); | 854 | unsigned long end, unsigned long newflags); |
851 | 855 | ||
852 | /* | 856 | /* |
853 | * get_user_pages_fast provides equivalent functionality to get_user_pages, | ||
854 | * operating on current and current->mm (force=0 and doesn't return any vmas). | ||
855 | * | ||
856 | * get_user_pages_fast may take mmap_sem and page tables, so no assumptions | ||
857 | * can be made about locking. get_user_pages_fast is to be implemented in a | ||
858 | * way that is advantageous (vs get_user_pages()) when the user memory area is | ||
859 | * already faulted in and present in ptes. However if the pages have to be | ||
860 | * faulted in, it may turn out to be slightly slower). | ||
861 | */ | ||
862 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | ||
863 | struct page **pages); | ||
864 | |||
865 | /* | ||
866 | * A callback you can register to apply pressure to ageable caches. | 857 | * A callback you can register to apply pressure to ageable caches. |
867 | * | 858 | * |
868 | * 'shrink' is passed a count 'nr_to_scan' and a 'gfpmask'. It should | 859 | * 'shrink' is passed a count 'nr_to_scan' and a 'gfpmask'. It should |
@@ -1061,7 +1052,8 @@ extern int __meminit __early_pfn_to_nid(unsigned long pfn); | |||
1061 | extern void set_dma_reserve(unsigned long new_dma_reserve); | 1052 | extern void set_dma_reserve(unsigned long new_dma_reserve); |
1062 | extern void memmap_init_zone(unsigned long, int, unsigned long, | 1053 | extern void memmap_init_zone(unsigned long, int, unsigned long, |
1063 | unsigned long, enum memmap_context); | 1054 | unsigned long, enum memmap_context); |
1064 | extern void setup_per_zone_pages_min(void); | 1055 | extern void setup_per_zone_wmarks(void); |
1056 | extern void calculate_zone_inactive_ratio(struct zone *zone); | ||
1065 | extern void mem_init(void); | 1057 | extern void mem_init(void); |
1066 | extern void __init mmap_init(void); | 1058 | extern void __init mmap_init(void); |
1067 | extern void show_mem(void); | 1059 | extern void show_mem(void); |
@@ -1178,8 +1170,6 @@ void task_dirty_inc(struct task_struct *tsk); | |||
1178 | #define VM_MAX_READAHEAD 128 /* kbytes */ | 1170 | #define VM_MAX_READAHEAD 128 /* kbytes */ |
1179 | #define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ | 1171 | #define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ |
1180 | 1172 | ||
1181 | int do_page_cache_readahead(struct address_space *mapping, struct file *filp, | ||
1182 | pgoff_t offset, unsigned long nr_to_read); | ||
1183 | int force_page_cache_readahead(struct address_space *mapping, struct file *filp, | 1173 | int force_page_cache_readahead(struct address_space *mapping, struct file *filp, |
1184 | pgoff_t offset, unsigned long nr_to_read); | 1174 | pgoff_t offset, unsigned long nr_to_read); |
1185 | 1175 | ||
@@ -1197,6 +1187,9 @@ void page_cache_async_readahead(struct address_space *mapping, | |||
1197 | unsigned long size); | 1187 | unsigned long size); |
1198 | 1188 | ||
1199 | unsigned long max_sane_readahead(unsigned long nr); | 1189 | unsigned long max_sane_readahead(unsigned long nr); |
1190 | unsigned long ra_submit(struct file_ra_state *ra, | ||
1191 | struct address_space *mapping, | ||
1192 | struct file *filp); | ||
1200 | 1193 | ||
1201 | /* Do stack extension */ | 1194 | /* Do stack extension */ |
1202 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); | 1195 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); |