函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:page_idle_clear_pte_refs_one

函数原型:static bool page_idle_clear_pte_refs_one(struct page *page, struct vm_area_struct *vma, unsigned long addr, void *arg)

返回类型:bool

参数:

类型参数名称
struct page *page
struct vm_area_struct *vma
unsigned longaddr
void *arg
58  struct page_vma_mapped_walk pvmw = {page = page, vma = vma, address = addr, }
63  bool referenced = false
65 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循环
66  addr等于address
67  如果pte
72  如果ptep_clear_young_notify(vma, addr, pte)则referenced = true
75  如果pmdp_clear_young_notify(vma, addr, pmd)则referenced = true
77  否则
79  WARN_ON_ONCE(1)
83  如果referenced
84  clear_page_idle(page)
90  set_page_young(page)
92  返回:true