函数逻辑报告 | 
Source Code:mm\swapfile.c | 
Create Date:2022-07-27 16:48:43 | 
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:unuse_pte_range
函数原型:static int unuse_pte_range(struct vm_area_struct *vma, pmd_t *pmd, unsigned long addr, unsigned long end, unsigned int type, bool frontswap, unsigned long *fs_pages_to_unuse)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct vm_area_struct * | vma | |
| pmd_t * | pmd | |
| unsigned long | addr | |
| unsigned long | end | |
| unsigned int | type | |
| bool | frontswap | |
| unsigned long * | fs_pages_to_unuse | 
| 1919 | ret等于0 | 
| 1923 | pte等于pte_offset_map(pmd, addr) | 
| 1924 | 循环 | 
| 1927 | 如果非heck whether a pte points to a swap entry 则继续下一循环 | 
| 1930 | entry等于Convert the arch-dependent pte representation of a swp_entry_t into an* arch-independent swp_entry_t. | 
| 1931 | 如果Extract the `type' field from a swp_entry_t. The swp_entry_t is in* arch-independent format不等于type则继续下一循环 | 
| 1934 | offset等于Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format | 
| 1935 | 如果frontswap且非frontswap_test(si, offset)则继续下一循环 | 
| 1940 | Target VMA 等于vma | 
| 1941 | Faulting virtual address 等于addr | 
| 1944 | 如果非page则 | 
| 1945 | 如果swap_map恒等于0或swap_map恒等于Note pageblock is bad, in first swap_map 则转到:try_next | 
| 1947 | 返回:负ENOMEM | 
| 1953 | 如果ret小于0则 | 
| 1956 | 转到:out | 
| 1963 | 如果fs_pages_to_unuse且非fs_pages_to_unuse先自减则 | 
| 1964 | ret等于Return code to denote that requested number of* frontswap pages are unused(moved to page cache).* Used in in shmem_unuse and try_to_unuse. | 
| 1965 | 转到:out | 
| 1967 | try_next : | 
| 1968 | pte等于pte_offset_map(pmd, addr) | 
| 1972 | ret等于0 | 
| 1973 | out : | 
| 1974 | 返回:ret | 
| 名称 | 描述 | 
|---|---|
| unuse_pmd_range | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |