Function report |
Source Code:mm\hugetlb.c |
Create Date:2022-07-28 15:26:54 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alloc_huge_page
Proto:struct page *alloc_huge_page(struct vm_area_struct *vma, unsigned long addr, int avoid_reserve)
Type:struct page
Parameter:
Type | Parameter | Name |
---|---|---|
struct vm_area_struct * | vma | |
unsigned long | addr | |
int | avoid_reserve |
1998 | spool = subpool_vma(vma) |
1999 | h = hstate_vma(vma) |
2006 | idx = hstate_index(h) |
2023 | If map_chg || avoid_reserve Then |
2025 | If gbl_chg < 0 Then |
2038 | If avoid_reserve Then gbl_chg = 1 |
2042 | ret = hugetlb_cgroup_charge_cgroup(idx, pages_per_huge_page(h), & h_cg) |
2043 | If ret Then Go to out_subpool_put |
2046 | spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
2052 | page = dequeue_huge_page_vma(h, vma, addr, avoid_reserve, gbl_chg) |
2053 | If Not page Then |
2054 | spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
2056 | If Not page Then Go to out_uncharge_cgroup |
2058 | If Not avoid_reserve && Returns true if the VMA has associated reserve pages Then |
2060 | resv_huge_pages-- |
2067 | spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
2069 | set_page_private(page, (unsignedlong)spool) |
2071 | map_commit = vma_commit_reservation(h, vma, addr) |
2085 | Forward declaration |
2087 | Return page |
2089 | out_uncharge_cgroup : |
2091 | out_subpool_put : |
2094 | vma_end_reservation(h, vma, addr) |
Name | Describe |
---|---|
hugetlb_cow | Hugetlb_cow() should be called with page lock of the original hugepage held.* Called with hugetlb_instantiation_mutex held and pte_page locked so we* cannot race with other handlers or page migration. |
hugetlb_no_page | |
hugetlb_mcopy_atomic_pte | Used by userfaultfd UFFDIO_COPY. Based on mcopy_atomic_pte with* modifications for huge pages. |
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 |