Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mincore_pte_range

Proto:static int mincore_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk)

Type:int

Parameter:

TypeParameterName
pmd_t *pmd
unsigned longaddr
unsigned longend
struct mm_walk *walk
126  vma = vma
128  vec = private
129  nr = end - addr >> PAGE_SHIFT determines the page size
131  ptl = mmap_sem must be held on entry
132  If ptl Then
133  memset(vec, 1, nr)
134  spin_unlock(ptl)
135  Go to out
138  If This is a noop if Transparent Hugepage Support is not built into* the kernel Then
139  __mincore_unmapped_range(addr, end, vma, vec)
140  Go to out
143  ptep = pte_offset_map_lock(mm, pmd, addr, & ptl)
144  When addr != end cycle
145  pte = ptep
147  If pte_none(pte) Then __mincore_unmapped_range(addr, addr + PAGE_SIZE, vma, vec)
150  Else if pte_present(pte) Then vec = 1
152  Else
155  If non_swap_entry(entry) Then
160  vec = 1
161  Else
166  WARN_ON(1)
167  vec = 1
171  vec++
173  pte_unmap_unlock(ptep - 1, ptl)
174  out :
175  private += nr
176  cond_resched()
177  Return 0