函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\page-flags.h Create Date:2022-07-27 06:40:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static __always_inline int PageKsm(struct page *page)

返回类型:int

参数:

类型参数名称
struct page *page
482  page等于compound_head(page)
483  返回: See page-flags.h for PAGE_MAPPING_FLAGS 按位与PAGE_MAPPING_FLAGS的值恒等于PAGE_MAPPING_KSM
调用者
名称描述
__dump_page
do_wp_pageThis routine handles present pages, when users try to write* to a shared page. It is done by copying the page to a new address* and decrementing the shared-page counter for the old page.* Note that this routine assumes that the protection checks have been
change_pte_range
page_referencedpage_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
do_page_add_anon_rmapSpecial version of the above for do_swap_page, which often runs* into pages that are exclusively owned by the current process.* Everybody else should continue to use page_add_anon_rmap above.
try_to_unmapry_to_unmap - try to remove all page table mappings to a page*@page: the page to get unmapped*@flags: action and flags* Tries to remove all the page table entries which are mapping this* page, used in the pageout path. Caller must hold the page lock.
rmap_walk
rmap_walk_lockedLike rmap_walk, but caller holds relevant rmap lock
reuse_swap_pageWe can write to an anon page without COW if there are no other references* to it. And as a side-effect, free up its swap: because the old content* on disk will never be read, and seeking back there to write new content
break_ksmWe use break_ksm to break COW on a ksm page: it's a stripped down* if (get_user_pages(addr, 1, 1, 1, &page, NULL) == 1)* put_page(page);* but taking great care only to touch a ksm page, in a VM_MERGEABLE vma,
page_stable_node
ksm_might_need_to_copy
rmap_walk_ksm
remove_migration_pteRestore a potential migration pte to a working pte entry
__unmap_and_move
hwpoison_user_mappingsDo all that is necessary to remove user space mappings. Unmap* the pages and send SIGBUS to the processes if the data was dirty.
page_idle_clear_pte_refs