函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:page_vma_mapped_walk - check if @pvmw->page is mapped in @pvmw->vma at*@pvmw->address*@pvmw: pointer to struct page_vma_mapped_walk. page, vma, address and flags* must be set. pmd, pte and ptl must be NULL.* Returns true if the page is mapped in the vma

函数原型:bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)

返回类型:bool

参数:

类型参数名称
struct page_vma_mapped_walk *pvmw
140  mm等于The address space we belong to.
141  page等于page
148  如果pmd且非pte则返回:not_found(pvmw)
151  如果pte则转到:next_pte
154  如果此条件成立可能性小(为编译器优化)(PageHuge(page))则
156  pte等于huge_pte_offset(mm, address, Returns the number of bytes in this potentially compound page. )
157  如果非pte则返回:false
160  ptl等于huge_pte_lockptr(page_hstate(page), mm, pte)
161  加自旋锁
162  如果非heck_pte - check if @pvmw->page is mapped at the @pvmw->pte* page_vma_mapped_walk() found a place where @pvmw->page is *potentially** mapped则返回:not_found(pvmw)
164  返回:true
166  restart :
167  pgd等于a shortcut to get a pgd_t in a given mm(mm, address)
168  如果非pgd_present( * pgd)则返回:false
170  p4d等于p4d_offset(pgd, address)
171  如果非p4d_present( * p4d)则返回:false
173  pud等于pud_offset(p4d, address)
174  如果非pud_present( * pud)则返回:false
176  pmd等于pmd_offset(pud, address)
182  pmde等于READ_ONCE( * pmd)
183  如果pmd_trans_huge(pmde)或is_pmd_migration_entry(pmde)则
184  ptl等于pmd_lock(mm, pmd)
190  返回:true
191  否则如果非pmd_present( * pmd)则
192  如果thp_migration_supported()则
196  entry等于pmd_to_swp_entry( * pmd)
198  如果migration_entry_to_page(entry)不等于page则返回:not_found(pvmw)
200  返回:true
203  返回:not_found(pvmw)
204  否则
207  ptl = NULL
209  否则如果非pmd_present(pmde)则
210  返回:false
212  如果非map_pte(pvmw)则转到:next_pte
214  当1循环
215  如果heck_pte - check if @pvmw->page is mapped at the @pvmw->pte* page_vma_mapped_walk() found a place where @pvmw->page is *potentially** mapped则返回:true
217  next_pte :
219  如果非PageHuge() only returns true for hugetlbfs pages, but not for* normal or transparent huge pages.* PageTransHuge() returns true for both transparent huge and* hugetlbfs pages, but not normal pages. PageTransHuge() can only bePageHuge(page)则返回:not_found(pvmw)
221  循环
222  address加等于PAGE_SIZE
229  如果address取模PMD_SIZE恒等于0则
230  pte_unmap(pte)
231  如果ptl
233  ptl = NULL
235  转到:restart
236  否则
237  pte自加
239 pte_none( * pte)循环
241  如果非ptl
242  ptl等于pte_lockptr(mm, pmd)
243  加自旋锁
调用者
名称描述
page_mapped_in_vmapage_mapped_in_vma - check whether a page is really mapped in a VMA*@page: the page to test*@vma: the VMA to test* Returns 1 if the page is mapped into the page tables of the VMA, 0* if the page is not mapped into the page tables of this VMA. Only
page_referenced_one
page_mkclean_one
try_to_unmap_one@arg: enum ttu_flags will be passed to this argument
write_protect_page
remove_migration_pteRestore a potential migration pte to a working pte entry
page_idle_clear_pte_refs_one
__replace_page__replace_page - replace page in vma by new page