函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:map_walk_file - do something to file 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_file(struct page *page, struct rmap_walk_control *rwc, bool locked)

返回类型:void

参数:

类型参数名称
struct page *page
struct rmap_walk_control *rwc
boollocked
1892  mapping等于page_mapping(page)
1902  VM_BUG_ON_PAGE(!PageLocked(page), page)
1904  如果非mapping则返回
1907  pgoff_start等于Get the offset in PAGE_SIZE.* (TODO: hugepage should have ->index in PAGE_SIZE)
1908  pgoff_end等于pgoff_starthpage_nr_pages(page)减1
1909  如果非lockedi_mmap_lock_read(mapping)
1913  address等于vma_address(page, vma)
1915  cond_resched()
1917  如果 for skipping uninterested vma for skipping uninterested vma(vma, passed to rmap_one() and invalid_vma())则继续下一循环
1920  如果非 executed on each vma where page is mapped(page, vma, address, passed to rmap_one() and invalid_vma())则转到:done
1922  如果 for checking traversing termination condition for checking traversing termination condition(page)则转到:done
1926  done :
1927  如果非lockedi_mmap_unlock_read(mapping)
调用者
名称描述
rmap_walk
rmap_walk_lockedLike rmap_walk, but caller holds relevant rmap lock