diff options
author | Nick Piggin <nickpiggin@yahoo.com.au> | 2009-06-16 18:31:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 22:47:30 -0400 |
commit | d2bf6be8ab63aa84e6149aac934649aadf3828b1 (patch) | |
tree | 65e7f74f1ed6fd9516f1615b0f293d2aaeede07b /include/linux/mm.h | |
parent | 7ffc59b4d0bdfa00e882339f85b8a969bb7021e2 (diff) |
mm: clean up get_user_pages_fast() documentation
Move more documentation for get_user_pages_fast into the new kerneldoc comment.
Add some comments for get_user_pages as well.
Also, move get_user_pages_fast declaration up to get_user_pages. It wasn't
there initially because it was once a static inline function.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Andy Grover <andy.grover@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 33da7f538841..a880161a3854 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -824,8 +824,11 @@ static inline int handle_mm_fault(struct mm_struct *mm, | |||
824 | extern int make_pages_present(unsigned long addr, unsigned long end); | 824 | 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); | 825 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); |
826 | 826 | ||
827 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, | 827 | 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); | 828 | unsigned long start, int len, int write, int force, |
829 | struct page **pages, struct vm_area_struct **vmas); | ||
830 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | ||
831 | struct page **pages); | ||
829 | 832 | ||
830 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | 833 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); |
831 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 834 | extern void do_invalidatepage(struct page *page, unsigned long offset); |
@@ -850,19 +853,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma, | |||
850 | unsigned long end, unsigned long newflags); | 853 | unsigned long end, unsigned long newflags); |
851 | 854 | ||
852 | /* | 855 | /* |
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. | 856 | * A callback you can register to apply pressure to ageable caches. |
867 | * | 857 | * |
868 | * 'shrink' is passed a count 'nr_to_scan' and a 'gfpmask'. It should | 858 | * 'shrink' is passed a count 'nr_to_scan' and a 'gfpmask'. It should |