函数逻辑报告 |
Source Code:mm\gup.c |
Create Date:2022-07-27 16:01:06 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__get_user_pages_locked
函数原型: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)
返回类型:long
参数:
类型 | 参数 | 名称 |
---|---|---|
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 | 如果locked则 |
1023 | 如果pages则flags或等于do get_page on page |
1026 | pages_done等于0 |
1027 | lock_dropped = false |
1028 | 循环 |
1036 | 如果非locked则 |
1041 | 如果ret大于0则 |
1047 | 如果locked则 |
1052 | 如果非pages_done则pages_done等于ret |
1054 | 退出 |
1060 | 如果此条件成立可能性大(为编译器优化)(pages)则pages加等于ret |
1062 | start加等于ret左移PAGE_SHIFT determines the page size 位 |
1069 | locked等于1 |
1070 | lock_dropped = true |
1071 | lock for reading |
1074 | 如果ret不等于1则 |
1080 | nr_pages自减 |
1081 | pages_done自加 |
1084 | 如果此条件成立可能性大(为编译器优化)(pages)则pages自加 |
1088 | 如果lock_dropped且locked则 |
1093 | lease a read lock |
1094 | locked等于0 |
1096 | 返回:pages_done |
名称 | 描述 |
---|---|
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, |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |