函数逻辑报告 |
Source Code:mm\huge_memory.c |
Create Date:2022-07-27 17:35:42 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:do_huge_pmd_wp_page_fallback
函数原型:static vm_fault_t do_huge_pmd_wp_page_fallback(struct vm_fault *vmf, pmd_t orig_pmd, struct page *page)
返回类型:vm_fault_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct vm_fault * | vmf | |
pmd_t | orig_pmd | |
struct page * | page |
1201 | vma等于Target VMA |
1202 | haddr等于Faulting virtual address 按位与HPAGE_PMD_MASK |
1207 | ret等于0 |
1213 | 如果此条件成立可能性小(为编译器优化)(!pages)则 |
1214 | ret或等于VM_FAULT_OOM |
1215 | 转到:out |
1218 | 以i小于HPAGE_PMD_NR循环 |
1219 | pages[i]等于alloc_page_vma_node(GFP_HIGHUSER_MOVABLE, vma, Faulting virtual address , page_to_nid(page)) |
1221 | 如果此条件成立可能性小(为编译器优化)(!pages[i] || mem_cgroup_try_charge_delay(pages[i], The address space we belong to. , GFP_KERNEL, & memcg, false))则 |
1224 | 如果pages[i]则Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. |
1227 | memcg等于page_private(pages[i]) |
1228 | set_page_private(pages[i], 0) |
1229 | mem_cgroup_cancel_charge(pages[i], memcg, false) |
1233 | 释放内存 |
1234 | ret或等于VM_FAULT_OOM |
1235 | 转到:out |
1237 | set_page_private(pages[i], (unsignedlong)memcg) |
1240 | 以i小于HPAGE_PMD_NR循环 |
1243 | __SetPageUptodate(pages[i]) |
1244 | cond_resched() |
1247 | mmu_notifier_range_init( & range, MMU_NOTIFY_CLEAR, 0, vma, The address space we belong to. , haddr, haddr + HPAGE_PMD_SIZE) |
1249 | mmu_notifier_invalidate_range_start( & range) |
1251 | Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.等于pmd_lock(The address space we belong to. , Pointer to pmd entry matching* the 'address' ) |
1252 | 如果此条件成立可能性小(为编译器优化)(!pmd_same( * Pointer to pmd entry matching* the 'address' , orig_pmd))则转到:out_free_pages |
1254 | VM_BUG_ON_PAGE(!PageHead(page), page) |
1267 | pmd_populate(The address space we belong to. , & _pmd, pgtable) |
1269 | 以i小于HPAGE_PMD_NR循环 |
1273 | memcg等于page_private(pages[i]) |
1274 | set_page_private(pages[i], 0) |
1276 | mem_cgroup_commit_charge(pages[i], memcg, TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., false) |
1278 | Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated.等于pte_offset_map( & _pmd, haddr) |
1279 | VM_BUG_ON(!pte_none( * Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated.)) |
1283 | 释放内存 |
1285 | smp_wmb() |
1286 | pmd_populate(The address space we belong to. , Pointer to pmd entry matching* the 'address' , pgtable) |
1288 | 自旋锁解锁 |
1296 | ret或等于VM_FAULT_WRITE |
1299 | out : |
1300 | 返回:ret |
1302 | out_free_pages : |
1303 | 自旋锁解锁 |
1304 | mmu_notifier_invalidate_range_end( & range) |
1305 | 以i小于HPAGE_PMD_NR循环 |
1306 | memcg等于page_private(pages[i]) |
1307 | set_page_private(pages[i], 0) |
1308 | mem_cgroup_cancel_charge(pages[i], memcg, false) |
1311 | 释放内存 |
1312 | 转到:out |
名称 | 描述 |
---|---|
do_huge_pmd_wp_page |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |