Function report |
Source Code:mm\memory.c |
Create Date:2022-07-28 14:43:37 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:By the time we get here, we already hold the mm semaphore* The mmap_sem may have been released depending on flags and our* return value. See filemap_fault() and __lock_page_or_retry().
Proto:static vm_fault_t __handle_mm_fault(struct vm_area_struct *vma, unsigned long address, unsigned int flags)
Type:vm_fault_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct vm_area_struct * | vma | |
| unsigned long | address | |
| unsigned int | flags |
| 4063 | struct vm_fault vmf = {Target VMA = vma, Faulting virtual address = address & PAGE_MASK, FAULT_FLAG_xxx flags = flags, Logical page offset based on vma = linear_page_index(vma, address), gfp mask to be used for allocations = __get_fault_gfp_mask(vma), } |
| 4070 | dirty = flags & Fault was a write access |
| 4077 | p4d = The following ifdef needed to get the 5level-fixup.h header to work.* Remove it when 5level-fixup.h has been removed. |
| 4078 | If Not p4d Then Return VM_FAULT_OOM |
| 4082 | If Not Pointer to pud entry matching* the 'address' Then Return VM_FAULT_OOM |
| 4084 | retry_pud : |
| 4086 | ret = create_huge_pud( & vmf) |
| 4087 | If Not (ret & VM_FAULT_FALLBACK) Then Return ret |
| 4089 | Else |
| 4093 | If pud_trans_huge(orig_pud) || pud_devmap(orig_pud) Then |
| 4098 | ret = wp_huge_pud( & vmf, orig_pud) |
| 4099 | If Not (ret & VM_FAULT_FALLBACK) Then Return ret |
| 4101 | Else |
| 4102 | huge_pud_set_accessed( & vmf, orig_pud) |
| 4103 | Return 0 |
| 4108 | Pointer to pmd entry matching* the 'address' = pmd_alloc(mm, Pointer to pud entry matching* the 'address', address) |
| 4109 | If Not Pointer to pmd entry matching* the 'address' Then Return VM_FAULT_OOM |
| 4113 | If See pmd_trans_unstable for discussion. Then Go to retry_pud |
| 4117 | ret = create_huge_pmd( & vmf) |
| 4118 | If Not (ret & VM_FAULT_FALLBACK) Then Return ret |
| 4120 | Else |
| 4125 | VM_BUG_ON(thp_migration_supported() && !is_pmd_migration_entry(orig_pmd)) |
| 4127 | If is_pmd_migration_entry(orig_pmd) Then pmd_migration_entry_wait(mm, Pointer to pmd entry matching* the 'address' ) |
| 4129 | Return 0 |
| 4131 | If pmd_trans_huge(orig_pmd) || pmd_devmap(orig_pmd) Then |
| 4132 | If pmd_protnone(orig_pmd) && vma_is_accessible(vma) Then Return NUMA hinting page fault entry point for trans huge pmds |
| 4137 | If Not (ret & VM_FAULT_FALLBACK) Then Return ret |
| 4139 | Else |
| 4140 | huge_pmd_set_accessed( & vmf, orig_pmd) |
| 4141 | Return 0 |
| Name | Describe |
|---|---|
| handle_mm_fault | By the time we get here, we already hold the mm semaphore* The mmap_sem may have been released depending on flags and our* return value. See filemap_fault() and __lock_page_or_retry(). |
| 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 |