Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:follow_huge_pmd

Proto:struct page *__weak follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int flags)

Type:struct page

Parameter:

TypeParameterName
struct mm_struct *mm
unsigned longaddress
pmd_t *pmd
intflags
4965  struct page * page = NULL
4968  retry :
4969  ptl = pmd_lockptr(mm, pmd)
4970  spin_lock(ptl)
4975  If Not pmd_huge( * pmd) Then Go to out
4977  pte = huge_ptep_get((pte_t * )pmd)
4978  If pte_present(pte) Then
4979  page = Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:( * pmd) + ((address & ~PMD_MASK) >> PAGE_SHIFT determines the page size )
4980  If flags & do get_page on page Then get_page(page)
4982  Else
4984  spin_unlock(ptl)
4986  Go to retry
4993  out :
4994  spin_unlock(ptl)
4995  Return page