Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\khugepaged.c Create Date:2022-07-28 16:06:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:static int hugepage_vma_revalidate(struct mm_struct *mm, unsigned long address, struct vm_area_struct **vmap)

Type:int

Parameter:

TypeParameterName
struct mm_struct *mm
unsigned longaddress
struct vm_area_struct **vmap
866  If Value for the false possibility is greater at compile time(khugepaged_test_exit(mm)) Then Return SCAN_ANY_PROCESS
869  vmap = vma = Look up the first VMA which satisfies addr < vm_end, NULL if none.
870  If Not vma Then Return 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  If address < hstart || address + HPAGE_PMD_SIZE > hend Then Return SCAN_ADDRESS_RANGE
877  If Not hugepage_vma_check(vma, Flags, see mm.h. ) Then Return SCAN_VMA_CHECK
879  Return 0
Caller
NameDescribe
__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