函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\khugepaged.c Create Date:2022-07-27 17:40:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:If mmap_sem temporarily dropped, revalidate vma* before taking mmap_sem.* Return 0 if succeeds, otherwise return none-zero* value (scan code).

函数原型:static int hugepage_vma_revalidate(struct mm_struct *mm, unsigned long address, struct vm_area_struct **vmap)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
unsigned longaddress
struct vm_area_struct **vmap
866  如果此条件成立可能性小(为编译器优化)(khugepaged_test_exit(mm))则返回:SCAN_ANY_PROCESS
869  vmap等于vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none.
870  如果非vma则返回:SCAN_VMA_NULL
873  hstart等于Our start address within vm_mm. HPAGE_PMD_MASK的反按位与HPAGE_PMD_MASK
874  hend等于The first byte after our end addresswithin vm_mm. 按位与HPAGE_PMD_MASK
875  如果address小于hstartaddressHPAGE_PMD_SIZE大于hend则返回:SCAN_ADDRESS_RANGE
877  如果非hugepage_vma_check(vma, Flags, see mm.h. )则返回:SCAN_VMA_CHECK
879  返回:0
调用者
名称描述
__collapse_huge_page_swapinBring missing pages in from swap, to complete THP collapse.* Only done if khugepaged_scan_pmd believes it is worthwhile.* Called and returns without pte mapped or spinlocks held,* but with mmap_sem held to protect against vma changes.
collapse_huge_page