函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:bool try_to_unmap(struct page *page, enum ttu_flags flags)

返回类型:bool

参数:

类型参数名称
struct page *page
enum ttu_flagsflags
1735  struct rmap_walk_control rwc = { executed on each vma where page is mapped = @arg: enum ttu_flags will be passed to this argument, passed to rmap_one() and invalid_vma() = (void * )flags, for checking traversing termination condition = page_mapcount_is_zero, 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, }
1750  如果flags按位与 migration mode 按位或 freeze pte under splitting thp 的值且非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 anyPageAnon(page)则 for skipping uninterested vma等于invalid_migration_vma
1754  如果flags按位与 do not grab rmap lock: * caller holds it Like rmap_walk, but caller holds relevant rmap lock
1756  否则rmap_walk(page, & rwc)
1759  返回:!page_mapcount(page) ? true : false
调用者
名称描述
__unmap_and_move
unmap_and_move_huge_pageCounterpart of unmap_and_move_page() for hugepage migration
unmap_page
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.
shrink_page_listshrink_page_list() returns the number of reclaimed pages