函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:page_referenced - test if the page was referenced*@page: the page to test*@is_locked: caller holds lock on the page*@memcg: target memory cgroup*@vm_flags: collect encountered vma->vm_flags who actually referenced the page* Quick test_and_clear_referenced

函数原型:int page_referenced(struct page *page, int is_locked, struct mem_cgroup *memcg, unsigned long *vm_flags)

返回类型:int

参数:

类型参数名称
struct page *page
intis_locked
struct mem_cgroup *memcg
unsigned long *vm_flags
862  we_locked等于0
863  struct page_referenced_arg pra = {mapcount = total_mapcount(page), memcg = memcg, }
867  struct rmap_walk_control rwc = { executed on each vma where page is mapped = page_referenced_one, passed to rmap_one() and invalid_vma() = (void * ) & pra, for getting anon_lock by optimized way rather than default = Similar to page_get_anon_vma() except it locks the anon_vma.* Its a little more complex as it tries to keep the fast path to a single* atomic op -- the trylock. If we fail the trylock, we fall back to getting a, }
873  vm_flags等于0
874  如果非mapcount则返回:0
877  如果非Neutral page->mapping pointer to address_space or anon_vma or other 则返回:0
880  如果非is_locked且非PageAnon(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的值则
881  we_locked等于Return true if the page was successfully locked
882  如果非we_locked则返回:1
891  如果memcg
892  for skipping uninterested vma等于invalid_page_referenced_vma
895  rmap_walk(page, & rwc)
896  vm_flags等于vm_flags
898  如果we_lockedlock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
901  返回:referenced
调用者
名称描述
shrink_active_list
page_check_references