Function report |
Source Code:mm\memory.c |
Create Date:2022-07-28 14:43:03 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:do_fault_around() tries to map few pages around the fault address. The hope* is that the pages will be needed soon and this will lower the number of* faults to handle.* It uses vm_ops->map_pages() to map the pages, which skips the page if it's
Proto:static vm_fault_t do_fault_around(struct vm_fault *vmf)
Type:vm_fault_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct vm_fault * | vmf |
| 3587 | address = Faulting virtual address |
| 3591 | ret = 0 |
| 3596 | Faulting virtual address = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(address & mask, Our start address within vm_mm. ) |
| 3597 | off = address - Faulting virtual address >> PAGE_SHIFT determines the page size & he i386 is two-level, so we don't really have any* PMD directory physically. - 1 |
| 3598 | start_pgoff -= off |
| 3610 | If pmd_none( * Pointer to pmd entry matching* the 'address' ) Then |
| 3614 | smp_wmb() |
| 3617 | map_pages(vmf, start_pgoff, end_pgoff) |
| 3620 | If pmd_trans_huge( * Pointer to pmd entry matching* the 'address' ) Then |
| 3621 | ret = VM_FAULT_NOPAGE |
| 3622 | Go to out |
| 3626 | If Not Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated. Then Go to out |
| 3631 | If Not pte_none( * Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated.) Then ret = VM_FAULT_NOPAGE |
| 3633 | 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.) |
| 3634 | out : |
| 3635 | Faulting virtual address = address |
| 3636 | Pointer to pte entry matching* the 'address'. NULL if the page* table hasn't been allocated. = NULL |
| 3637 | Return ret |
| Name | Describe |
|---|---|
| do_read_fault |
| 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 |