Function report |
Source Code:mm\gup.c |
Create Date:2022-07-28 14:35:12 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__get_user_pages_locked
Proto:static __always_inline long __get_user_pages_locked(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, struct page **pages, struct vm_area_struct **vmas, int *locked, unsigned int flags)
Type:long
Parameter:
Type | Parameter | Name |
---|---|---|
struct task_struct * | tsk | |
struct mm_struct * | mm | |
unsigned long | start | |
unsigned long | nr_pages | |
struct page ** | pages | |
struct vm_area_struct ** | vmas | |
int * | locked | |
unsigned int | flags |
1016 | If locked Then |
1023 | If pages Then flags |= do get_page on page |
1026 | pages_done = 0 |
1027 | lock_dropped = false |
1028 | cycle |
1036 | If Not locked Then |
1041 | If ret > 0 Then |
1047 | If locked Then |
1052 | If Not pages_done Then pages_done = ret |
1054 | Break |
1060 | If Value is more likely to compile time(pages) Then pages += ret |
1062 | start += ret << PAGE_SHIFT determines the page size |
1069 | locked = 1 |
1070 | lock_dropped = true |
1071 | lock for reading |
1074 | If ret != 1 Then |
1080 | nr_pages-- |
1081 | pages_done++ |
1082 | If Not nr_pages Then Break |
1084 | If Value is more likely to compile time(pages) Then pages++ |
1088 | If lock_dropped && locked Then |
1093 | lease a read lock |
1094 | locked = 0 |
1096 | Return pages_done |
Name | Describe |
---|---|
get_user_pages_remote | get_user_pages_remote() - pin user pages in memory*@tsk: the task_struct to use for page fault accounting, or* NULL if faults are not to be recorded |
check_and_migrate_cma_pages | |
__gup_longterm_locked | __gup_longterm_locked() is a wrapper for __get_user_pages_locked which* allows us to process the FOLL_LONGTERM flag. |
get_user_pages_locked | We can leverage the VM_FAULT_RETRY functionality in the page fault* paths better by using either get_user_pages_locked() or* get_user_pages_unlocked().* get_user_pages_locked() is suitable to replace the form:* down_read(&mm->mmap_sem);* do_something() |
get_user_pages_unlocked | get_user_pages_unlocked() is suitable to replace the form:* down_read(&mm->mmap_sem);* get_user_pages(tsk, mm, |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |