函数逻辑报告 |
Source Code:mm\memory.c |
Create Date:2022-07-27 16:09:58 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:We enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults), and pte mapped but not yet locked.* We return with mmap_sem still held, but pte unmapped and unlocked.
函数原型:static vm_fault_t do_anonymous_page(struct vm_fault *vmf)
返回类型:vm_fault_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct vm_fault * | vmf |
3119 | vma等于Target VMA |
3122 | ret等于0 |
3126 | 如果Flags, see mm.h. 按位与VM_SHARED则返回:VM_FAULT_SIGBUS |
3139 | 如果pte_alloc(The address space we belong to. , Pointer to pmd entry matching* the 'address' )则返回:VM_FAULT_OOM |
3143 | 如果此条件成立可能性小(为编译器优化)(This is a noop if Transparent Hugepage Support is not built into* the kernel)则返回:0 |
3149 | entry等于pte_mkspecial(pfn_pte(my_zero_pfn(Faulting virtual address ), Access permissions of this VMA. )) |
3153 | 如果非pte_none( * Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated.)则转到:unlock |
3159 | 如果userfaultfd_missing(vma)则 |
3160 | pte_unmap_unlock(Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.) |
3161 | 返回:handle_userfault(vmf, missing pages tracking ) |
3163 | 转到:setpte |
3167 | 如果此条件成立可能性小(为编译器优化)(anon_vma_prepare(vma))则转到:oom |
3173 | 如果mem_cgroup_try_charge_delay(page, The address space we belong to. , GFP_KERNEL, & memcg, false)则转到:oom_free_page |
3182 | __SetPageUptodate(page) |
3185 | 如果Flags, see mm.h. 按位与VM_WRITE则entry等于pte_mkwrite(pte_mkdirty(entry)) |
3190 | 如果非pte_none( * Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated.)则转到:release |
3198 | 如果userfaultfd_missing(vma)则 |
3199 | pte_unmap_unlock(Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.) |
3200 | mem_cgroup_cancel_charge(page, memcg, false) |
3202 | 返回:handle_userfault(vmf, missing pages tracking ) |
3206 | page_add_new_anon_rmap(page, vma, Faulting virtual address , false) |
3207 | mem_cgroup_commit_charge(page, 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) |
3209 | setpte : |
3210 | set_pte_at(The address space we belong to. , Faulting virtual address , Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., entry) |
3214 | unlock : |
3215 | pte_unmap_unlock(Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated., Page table lock.* Protects pte page table if 'pte'* is not NULL, otherwise pmd.) |
3216 | 返回:ret |
3217 | release : |
3218 | mem_cgroup_cancel_charge(page, memcg, false) |
3220 | 转到:unlock |
3221 | oom_free_page : |
3223 | oom : |
3224 | 返回:VM_FAULT_OOM |
名称 | 描述 |
---|---|
handle_pte_fault | These routines also need to handle stuff like marking pages dirty* and/or accessed for architectures that don't do it in hardware (most* RISC architectures) |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |