函数逻辑报告 |
Source Code:mm\hugetlb.c |
Create Date:2022-07-27 16:58:14 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:alloc_huge_page
函数原型:struct page *alloc_huge_page(struct vm_area_struct *vma, unsigned long addr, int avoid_reserve)
返回类型:struct page
参数:
类型 | 参数 | 名称 |
---|---|---|
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 | 如果map_chg或avoid_reserve则 |
2025 | 如果gbl_chg小于0则 |
2026 | vma_end_reservation(h, vma, addr) |
2027 | 返回:错误号 |
2038 | 如果avoid_reserve则gbl_chg等于1 |
2042 | ret等于hugetlb_cgroup_charge_cgroup(idx, pages_per_huge_page(h), & h_cg) |
2043 | 如果ret则转到:out_subpool_put |
2046 | 加自旋锁 |
2052 | page等于dequeue_huge_page_vma(h, vma, addr, avoid_reserve, gbl_chg) |
2053 | 如果非page则 |
2067 | 自旋锁解锁 |
2069 | set_page_private(page, (unsignedlong)spool) |
2071 | map_commit等于vma_commit_reservation(h, vma, addr) |
2072 | 如果此条件成立可能性小(为编译器优化)(map_chg > map_commit)则 |
2085 | Forward declaration |
2087 | 返回:page |
2089 | out_uncharge_cgroup : |
2091 | out_subpool_put : |
2094 | vma_end_reservation(h, vma, addr) |
2095 | 返回:错误号 |
名称 | 描述 |
---|---|
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. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |