函数逻辑报告 | 
Source Code:mm\memory.c | 
Create Date:2022-07-27 16:07:25 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:zap_pte_range
函数原型:static unsigned long zap_pte_range(struct mmu_gather *tlb, struct vm_area_struct *vma, pmd_t *pmd, unsigned long addr, unsigned long end, struct zap_details *details)
返回类型:unsigned long
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct mmu_gather * | tlb | |
| struct vm_area_struct * | vma | |
| pmd_t * | pmd | |
| unsigned long | addr | |
| unsigned long | end | |
| struct zap_details * | details | 
| 1028 | force_flush等于0 | 
| 1035 | tlb_change_page_size(tlb, PAGE_SIZE) | 
| 1036 | again : | 
| 1037 | init_rss_vec(rss) | 
| 1040 | flush_tlb_batched_pending(mm) | 
| 1042 | 循环 | 
| 1047 | 如果need_resched()则退出 | 
| 1050 | 如果pte_present(ptent)则 | 
| 1054 | 如果此条件成立可能性小(为编译器优化)(details)且page则 | 
| 1064 | ptent等于ptep_get_and_clear_full(mm, addr, pte, we are in the middle of an operation to clear* a full mm and can make some optimizations) | 
| 1067 | 如果此条件成立可能性小(为编译器优化)(!page)则继续下一循环 | 
| 1072 | force_flush等于1 | 
| 1073 | Dirty a page | 
| 1079 | rss[mm_counter(page)]自减 | 
| 1080 | page_remove_rmap(page, false) | 
| 1083 | 如果此条件成立可能性小(为编译器优化)(__tlb_remove_page(tlb, page))则 | 
| 1088 | 继续下一循环 | 
| 1091 | entry等于Convert the arch-dependent pte representation of a swp_entry_t into an* arch-independent swp_entry_t. | 
| 1092 | 如果non_swap_entry(entry)且is_device_private_entry(entry)则 | 
| 1095 | 如果此条件成立可能性小(为编译器优化)(details && Check page->mapping if set )则 | 
| 1107 | rss[mm_counter(page)]自减 | 
| 1108 | page_remove_rmap(page, false) | 
| 1110 | 继续下一循环 | 
| 1114 | 如果此条件成立可能性小(为编译器优化)(details)则继续下一循环 | 
| 1117 | 如果非non_swap_entry(entry)则rss[MM_SWAPENTS]自减 | 
| 1119 | 否则如果is_migration_entry(entry)则 | 
| 1122 | page等于migration_entry_to_page(entry) | 
| 1123 | rss[mm_counter(page)]自减 | 
| 1130 | add_mm_rss_vec(mm, rss) | 
| 1131 | arch_leave_lazy_mmu_mode() | 
| 1134 | 如果force_flush则tlb_flush_mmu_tlbonly(tlb) | 
| 1136 | pte_unmap_unlock(start_pte, ptl) | 
| 1144 | 如果force_flush则 | 
| 1145 | force_flush等于0 | 
| 1146 | tlb_flush_mmu(tlb) | 
| 1150 | cond_resched() | 
| 1151 | 转到:again | 
| 1154 | 返回:addr | 
| 名称 | 描述 | 
|---|---|
| zap_pmd_range | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |