函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mincore_pte_range

函数原型:static int mincore_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk)

返回类型:int

参数:

类型参数名称
pmd_t *pmd
unsigned longaddr
unsigned longend
struct mm_walk *walk
126  vma等于vma
128  vec等于private
129  nr等于endaddr右移PAGE_SHIFT determines the page size
131  ptl等于mmap_sem must be held on entry
132  如果ptl
133  memset(vec, 1, nr)
134  自旋锁解锁
135  转到:out
138  如果This is a noop if Transparent Hugepage Support is not built into* the kernel
139  __mincore_unmapped_range(addr, end, vma, vec)
140  转到:out
143  ptep等于pte_offset_map_lock(mm, pmd, addr, & ptl)
144 addr不等于end循环
145  pte等于ptep
147  如果pte_none(pte)则__mincore_unmapped_range(addr, addr + PAGE_SIZE, vma, vec)
150  否则如果pte_present(pte)则vec等于1
152  否则
155  如果non_swap_entry(entry)则
160  vec等于1
161  否则
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  返回:0