Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:rmap_walk_ksm

Proto:void rmap_walk_ksm(struct page *page, struct rmap_walk_control *rwc)

Type:void

Parameter:

TypeParameterName
struct page *page
struct rmap_walk_control *rwc
2595  search_new_forks = 0
2597  VM_BUG_ON_PAGE(!A KSM page is one of those write-protected "shared pages" or "merged pages"* which KSM maps into multiple mms, wherever identical anonymous page content* is found in VM_MERGEABLE vmas. It's a PageAnon page, pointing not to any, page)
2603  VM_BUG_ON_PAGE(!PageLocked(page), page)
2605  stable_node = page_stable_node(page)
2606  If Not stable_node Then Return
2608  again :
2610  anon_vma = when stable
2614  cond_resched()
2615  anon_vma_lock_read(anon_vma)
2620  cond_resched()
2621  vma = vma
2624  addr = + low bits used for flags below & ~KSM_FLAG_MASK
2626  If addr < Our start address within vm_mm. || addr >= The first byte after our end addresswithin vm_mm. Then Continue
2634  If mm == The address space we belong to. == search_new_forks Then Continue
2637  If for skipping uninterested vma && for skipping uninterested vma(vma, passed to rmap_one() and invalid_vma()) Then Continue
2640  If Not executed on each vma where page is mapped(page, vma, addr, passed to rmap_one() and invalid_vma()) Then
2641  anon_vma_unlock_read(anon_vma)
2642  Return
2644  If for checking traversing termination condition && for checking traversing termination condition(page) Then
2645  anon_vma_unlock_read(anon_vma)
2646  Return
2649  anon_vma_unlock_read(anon_vma)
2651  If Not search_new_forks ++ Then Go to again