Function report |
Source Code:mm\memory.c |
Create Date:2022-07-28 14:43:09 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:do_cow_fault
Proto:static vm_fault_t do_cow_fault(struct vm_fault *vmf)
Type:vm_fault_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct vm_fault * | vmf |
| 3669 | vma = Target VMA |
| 3672 | If Value for the false possibility is greater at compile time(anon_vma_prepare(vma)) Then Return VM_FAULT_OOM |
| 3675 | Page handler may use for COW fault = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, Faulting virtual address ) |
| 3676 | If Not Page handler may use for COW fault Then Return VM_FAULT_OOM |
| 3679 | If mem_cgroup_try_charge_delay(Page handler may use for COW fault , The address space we belong to. , GFP_KERNEL, & Cgroup cow_page belongs to , false) Then |
| 3682 | Return VM_FAULT_OOM |
| 3685 | ret = The mmap_sem must have been held on entry, and may have been* released depending on flags and vma->vm_ops->fault() return value.* See filemap_fault() and __lock_page_retry(). |
| 3686 | If Value for the false possibility is greater at compile time(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY)) Then Go to uncharge_out |
| 3688 | If ret & VM_FAULT_DONE_COW Then Return ret |
| 3696 | put_page(->fault handlers should return a* page here, unless VM_FAULT_NOPAGE* is set (which is also implied by* VM_FAULT_ERROR).) |
| 3697 | If Value for the false possibility is greater at compile time(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY)) Then Go to uncharge_out |
| 3699 | Return ret |
| 3700 | uncharge_out : |
| 3701 | mem_cgroup_cancel_charge(Page handler may use for COW fault , Cgroup cow_page belongs to , false) |
| 3703 | Return ret |
| Name | Describe |
|---|---|
| do_fault | We enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults) |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |