函数逻辑报告 |
Source Code:mm\hugetlb.c |
Create Date:2022-07-27 17:00:18 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__unmap_hugepage_range
函数原型:void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct mmu_gather * | tlb | |
struct vm_area_struct * | vma | |
unsigned long | start | |
unsigned long | end | |
struct page * | ref_page |
3410 | h等于hstate_vma(vma) |
3411 | sz等于huge_page_size(h) |
3414 | WARN_ON(!is_vm_hugetlb_page(vma)) |
3415 | BUG_ON(start & ~huge_page_mask(h)) |
3416 | BUG_ON(end & ~huge_page_mask(h)) |
3422 | tlb_change_page_size(tlb, sz) |
3423 | tlb_start_vma(tlb, vma) |
3428 | mmu_notifier_range_init( & range, MMU_NOTIFY_UNMAP, 0, vma, mm, start, end) |
3430 | adjust_range_if_pmd_sharing_possible(vma, & start, & end) |
3431 | mmu_notifier_invalidate_range_start( & range) |
3434 | ptep等于huge_pte_offset(mm, address, sz) |
3435 | 如果非ptep则继续下一循环 |
3438 | ptl等于huge_pte_lock(h, mm, ptep) |
3439 | 如果huge_pmd_unshare(mm, & address, ptep)则 |
3440 | 自旋锁解锁 |
3445 | 继续下一循环 |
3448 | pte等于huge_ptep_get(ptep) |
3449 | 如果huge_pte_none(pte)则 |
3450 | 自旋锁解锁 |
3451 | 继续下一循环 |
3458 | 如果此条件成立可能性小(为编译器优化)(!pte_present(pte))则 |
3470 | 如果ref_page则 |
3483 | pte等于huge_ptep_get_and_clear(mm, address, ptep) |
3484 | tlb_remove_huge_tlb_entry(h, tlb, ptep, address) |
3485 | 如果huge_pte_dirty(pte)则Dirty a page |
3488 | hugetlb_count_sub(pages_per_huge_page(h), mm) |
3491 | 自旋锁解锁 |
3492 | tlb_remove_page_size(tlb, page, huge_page_size(h)) |
3499 | mmu_notifier_invalidate_range_end( & range) |
3500 | tlb_end_vma(tlb, vma) |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |