函数逻辑报告 |
Source Code:mm\hugetlb.c |
Create Date:2022-07-27 17:01:22 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:follow_hugetlb_page
函数原型:long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, struct page **pages, struct vm_area_struct **vmas, unsigned long *position, unsigned long *nr_pages, long i, unsigned int flags, int *nonblocking)
返回类型:long
参数:
类型 | 参数 | 名称 |
---|---|---|
struct mm_struct * | mm | |
struct vm_area_struct * | vma | |
struct page ** | pages | |
struct vm_area_struct ** | vmas | |
unsigned long * | position | |
unsigned long * | nr_pages | |
long | i | |
unsigned int | flags | |
int * | nonblocking |
4274 | h等于hstate_vma(vma) |
4279 | spinlock_t * ptl = NULL |
4287 | 如果fatal_signal_pending(当前进程)则 |
4299 | pte等于huge_pte_offset(mm, vaddr & huge_page_mask(h), huge_page_size(h)) |
4303 | absent等于非pte或huge_pte_none(huge_ptep_get(pte)) |
4334 | fault_flags等于0 |
4342 | 如果flags按位与 a disk transfer is needed, start the IO* and return without waiting upon it 则fault_flags或等于Retry fault if blocking 按位或Don't drop mmap_sem and wait when retrying |
4345 | 如果flags按位与a retry, previous pass started an IO 则 |
4348 | fault_flags或等于Second try |
4350 | ret等于hugetlb_fault(mm, vma, vaddr, fault_flags) |
4351 | 如果ret按位与VM_FAULT_ERROR则 |
4352 | err等于NOTE on FOLL_LONGTERM:* FOLL_LONGTERM indicates that the page will be held for an indefinite time* period _often_ under userspace control |
4353 | remainder等于0 |
4354 | 退出 |
4356 | 如果ret按位与VM_FAULT_RETRY则 |
4357 | 如果nonblocking且非fault_flags按位与Don't drop mmap_sem and wait when retrying 的值则nonblocking等于0 |
4360 | nr_pages等于0 |
4370 | 返回:i |
4372 | 继续下一循环 |
4375 | pfn_offset等于vaddr按位与huge_page_mask(h)的反的值右移PAGE_SHIFT determines the page size 位 |
4376 | page等于pte_page(huge_ptep_get(pte)) |
4382 | 如果此条件成立可能性小(为编译器优化)(page_count(page) <= 0)则 |
4398 | vaddr加等于huge_page_size(h) |
4399 | remainder减等于pages_per_huge_page(h) |
4400 | i加等于pages_per_huge_page(h) |
4401 | 自旋锁解锁 |
4402 | 继续下一循环 |
4405 | same_page : |
4406 | 如果pages则 |
4415 | pfn_offset先自加 |
4416 | remainder先自减 |
4417 | i先自加 |
4424 | 转到:same_page |
4426 | 自旋锁解锁 |
名称 | 描述 |
---|---|
__get_user_pages | __get_user_pages() - pin user pages in memory*@tsk: task_struct of target task*@mm: mm_struct of target mm*@start: starting user address*@nr_pages: number of pages from start to pin*@gup_flags: flags modifying pin behaviour |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |