Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\rmap.c Create Date:2022-07-28 14:57:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static void rmap_walk_anon(struct page *page, struct rmap_walk_control *rwc, bool locked)

Type:void

Parameter:

TypeParameterName
struct page *page
struct rmap_walk_control *rwc
boollocked
1844  If locked Then
1845  anon_vma = page_anon_vma(page)
1847  VM_BUG_ON_PAGE(!anon_vma, page)
1848  Else
1849  anon_vma = rmap_walk_anon_lock(page, rwc)
1851  If Not anon_vma Then Return
1854  pgoff_start = Get the offset in PAGE_SIZE.* (TODO: hugepage should have ->index in PAGE_SIZE)
1855  pgoff_end = pgoff_start + hpage_nr_pages(page) - 1
1858  vma = vma
1859  address = vma_address(page, vma)
1861  cond_resched()
1863  If for skipping uninterested vma && for skipping uninterested vma(vma, passed to rmap_one() and invalid_vma()) Then Continue
1866  If Not executed on each vma where page is mapped(page, vma, address, passed to rmap_one() and invalid_vma()) Then Break
1868  If for checking traversing termination condition && for checking traversing termination condition(page) Then Break
1872  If Not locked Then anon_vma_unlock_read(anon_vma)
Caller
NameDescribe
rmap_walk
rmap_walk_lockedLike rmap_walk, but caller holds relevant rmap lock