Function report |
Source Code:mm\huge_memory.c |
Create Date:2022-07-28 16:00:52 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__do_huge_pmd_anonymous_page
Proto:static vm_fault_t __do_huge_pmd_anonymous_page(struct vm_fault *vmf, struct page *page, gfp_t gfp)
Type:vm_fault_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct vm_fault * | vmf | |
| struct page * | page | |
| gfp_t | gfp |
| 578 | vma = Target VMA |
| 582 | ret = 0 |
| 584 | VM_BUG_ON_PAGE(!PageCompound(page), page) |
| 586 | If mem_cgroup_try_charge_delay(page, The address space we belong to. , gfp, & memcg, true) Then |
| 588 | Disable counters |
| 589 | Return VM_FAULT_FALLBACK |
| 594 | ret = VM_FAULT_OOM |
| 595 | Go to release |
| 604 | __SetPageUptodate(page) |
| 606 | 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' ) |
| 608 | Go to unlock_release |
| 609 | Else |
| 613 | If ret Then Go to unlock_release |
| 617 | If userfaultfd_missing(vma) Then |
| 621 | mem_cgroup_cancel_charge(page, memcg, true) |
| 624 | ret2 = handle_userfault(vmf, missing pages tracking ) |
| 625 | VM_BUG_ON(ret2 & VM_FAULT_FALLBACK) |
| 626 | Return ret2 |
| 630 | entry = maybe_pmd_mkwrite(pmd_mkdirty(entry), vma) |
| 632 | 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., true) |
| 634 | pgtable_trans_huge_deposit(The address space we belong to. , Pointer to pmd entry matching* the 'address' , pgtable) |
| 635 | set_pmd_at(The address space we belong to. , haddr, Pointer to pmd entry matching* the 'address' , entry) |
| 639 | Disable counters |
| 640 | count_memcg_events(memcg, THP_FAULT_ALLOC, 1) |
| 643 | Return 0 |
| 644 | unlock_release : |
| 646 | release : |
| 647 | If pgtable Then pte_free - free PTE-level user page table page*@mm: the mm_struct of the current context*@pte_page: the `struct page` representing the page table |
| 649 | mem_cgroup_cancel_charge(page, memcg, true) |
| 651 | Return ret |
| Name | Describe |
|---|---|
| do_huge_pmd_anonymous_page |
| 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 |