函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:map_walk_anon - do something to anonymous page using the object-based* rmap method*@page: the page to be handled*@rwc: control variable according to each walk type* Find all the mappings of a page using the mapping pointer and the vma chains

函数原型:static void rmap_walk_anon(struct page *page, struct rmap_walk_control *rwc, bool locked)

返回类型:void

参数:

类型参数名称
struct page *page
struct rmap_walk_control *rwc
boollocked
1844  如果locked
1845  anon_vma等于page_anon_vma(page)
1847  VM_BUG_ON_PAGE(!anon_vma, page)
1848  否则
1849  anon_vma等于rmap_walk_anon_lock(page, rwc)
1851  如果非anon_vma则返回
1854  pgoff_start等于Get the offset in PAGE_SIZE.* (TODO: hugepage should have ->index in PAGE_SIZE)
1855  pgoff_end等于pgoff_starthpage_nr_pages(page)减1
1858  vma等于vma
1859  address等于vma_address(page, vma)
1861  cond_resched()
1863  如果 for skipping uninterested vma for skipping uninterested vma(vma, passed to rmap_one() and invalid_vma())则继续下一循环
1866  如果非 executed on each vma where page is mapped(page, vma, address, passed to rmap_one() and invalid_vma())则退出
1868  如果 for checking traversing termination condition for checking traversing termination condition(page)则退出
1872  如果非lockedanon_vma_unlock_read(anon_vma)
调用者
名称描述
rmap_walk
rmap_walk_lockedLike rmap_walk, but caller holds relevant rmap lock