Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

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

Type:void

Parameter:

TypeParameterName
struct page *page
struct rmap_walk_control *rwc
boollocked
1892  mapping = page_mapping(page)
1902  VM_BUG_ON_PAGE(!PageLocked(page), page)
1904  If Not mapping Then Return
1907  pgoff_start = Get the offset in PAGE_SIZE.* (TODO: hugepage should have ->index in PAGE_SIZE)
1908  pgoff_end = pgoff_start + hpage_nr_pages(page) - 1
1909  If Not locked Then i_mmap_lock_read(mapping)
1913  address = vma_address(page, vma)
1915  cond_resched()
1917  If for skipping uninterested vma && for skipping uninterested vma(vma, passed to rmap_one() and invalid_vma()) Then Continue
1920  If Not executed on each vma where page is mapped(page, vma, address, passed to rmap_one() and invalid_vma()) Then Go to done
1922  If for checking traversing termination condition && for checking traversing termination condition(page) Then Go to done
1926  done :
1927  If Not locked Then i_mmap_unlock_read(mapping)
Caller
NameDescribe
rmap_walk
rmap_walk_lockedLike rmap_walk, but caller holds relevant rmap lock