函数逻辑报告 |
Source Code:mm\huge_memory.c |
Create Date:2022-07-27 17:36:22 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:zap_huge_pmd
函数原型:int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma, pmd_t *pmd, unsigned long addr)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct mmu_gather * | tlb | |
| struct vm_area_struct * | vma | |
| pmd_t * | pmd | |
| unsigned long | addr |
| 1783 | 如果非ptl则返回:0 |
| 1791 | orig_pmd等于pmdp_huge_get_and_clear_full(mm, addr, pmd, we are in the middle of an operation to clear* a full mm and can make some optimizations) |
| 1793 | tlb_remove_pmd_tlb_entry(tlb, pmd, addr) |
| 1794 | 如果vma_is_dax(vma)则 |
| 1795 | 如果arch_needs_pgtable_deposit()则zap_deposited_table(mm, pmd) |
| 1797 | 自旋锁解锁 |
| 1800 | 否则如果is_huge_zero_pmd(orig_pmd)则 |
| 1801 | zap_deposited_table(mm, pmd) |
| 1802 | 自旋锁解锁 |
| 1804 | 否则 |
| 1806 | flush_needed等于1 |
| 1808 | 如果pmd_present(orig_pmd)则 |
| 1809 | page等于Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:(orig_pmd) |
| 1811 | VM_BUG_ON_PAGE(page_mapcount(page) < 0, page) |
| 1812 | VM_BUG_ON_PAGE(!PageHead(page), page) |
| 1813 | 否则如果thp_migration_supported()则 |
| 1816 | VM_BUG_ON(!is_pmd_migration_entry(orig_pmd)) |
| 1817 | entry等于pmd_to_swp_entry(orig_pmd) |
| 1818 | page等于pfn_to_page(Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format) |
| 1819 | flush_needed等于0 |
| 1820 | 否则WARN_ONCE(1, "Non present huge pmd without pmd migration enabled!") |
| 1824 | zap_deposited_table(mm, pmd) |
| 1825 | add_mm_counter(mm, MM_ANONPAGES, - HPAGE_PMD_NR) |
| 1826 | 否则 |
| 1827 | 如果arch_needs_pgtable_deposit()则zap_deposited_table(mm, pmd) |
| 1832 | 自旋锁解锁 |
| 1833 | 如果flush_needed则tlb_remove_page_size(tlb, page, HPAGE_PMD_SIZE) |
| 1836 | 返回:1 |
| 名称 | 描述 |
|---|---|
| zap_pmd_range |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |