Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:bool try_to_unmap(struct page *page, enum ttu_flags flags)

Type:bool

Parameter:

TypeParameterName
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  If flags & ( migration mode | freeze pte under splitting thp ) && Not 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 && PageAnon(page) Then for skipping uninterested vma = invalid_migration_vma
1754  If flags & do not grab rmap lock: * caller holds it Then Like rmap_walk, but caller holds relevant rmap lock
1756  Else rmap_walk(page, & rwc)
1759  Return !page_mapcount(page) ? true : false
Caller
NameDescribe
__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.