函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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
注解内核,赢得工具下载SCCTEnglish

函数名称: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 longaddr
1780  tlb_change_page_size(tlb, HPAGE_PMD_SIZE)
1782  ptl等于Returns page table lock pointer if a given pmd maps a thp, NULL otherwise.* Note that if it returns page table lock pointer, this routine returns without* unlocking page table lock. So callers must unlock it.
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  自旋锁解锁
1798  如果is_huge_zero_pmd(orig_pmd)则tlb_remove_page_size(tlb, Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:(orig_pmd), HPAGE_PMD_SIZE)
1800  否则如果is_huge_zero_pmd(orig_pmd)则
1801  zap_deposited_table(mm, pmd)
1802  自旋锁解锁
1803  tlb_remove_page_size(tlb, Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:(orig_pmd), HPAGE_PMD_SIZE)
1804  否则
1805  struct page * page = NULL
1806  flush_needed等于1
1808  如果pmd_present(orig_pmd)则
1813  否则如果thp_migration_supported()则
1819  flush_needed等于0
1820  否则WARN_ONCE(1, "Non present huge pmd without pmd migration enabled!")
1823  如果PageAnon(page)则
1826  否则
1832  自旋锁解锁
1833  如果flush_neededtlb_remove_page_size(tlb, page, HPAGE_PMD_SIZE)
1836  返回:1
调用者
名称描述
zap_pmd_range