函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Return true if this page is mapped into pagetables.* For compound page it returns true if any subpage of compound page is mapped.

函数原型:bool page_mapped(struct page *page)

返回类型:bool

参数:

类型参数名称
struct page *page
632  如果此条件成立可能性大(为编译器优化)(!PageCompound(page))则返回:atomic_read( & * If the page can be mapped to userspace, encodes the number * of times this page is referenced by a page table.)大于等于0
634  page等于compound_head(page)
635  如果atomic_read(compound_mapcount_ptr(page))大于等于0则返回:true
637  如果PageHuge(page)则返回:false
639 i小于Returns the number of pages in this potentially compound page. 循环
640  如果atomic_read( & * If the page can be mapped to userspace, encodes the number * of times this page is referenced by a page table.)大于等于0则返回:true
643  返回:false
调用者
名称描述
unaccount_page_cache_page
lru_deactivate_file_fnIf the page can not be invalidated, it is moved to the* inactive list to speed up its reclaim. It is moved to the* head of the list, rather than the tail, to give the flusher* threads some time to write it out, as this is much more
truncate_cleanup_pageIf truncate cannot remove the fs-private metadata from the page, the page* becomes orphaned
invalidate_inode_pageSafely invalidate one page from its pagecache mapping.* It only drops clean, unused pages. The page must be locked.* Returns 1 if the page is successfully invalidated, otherwise 0.
invalidate_inode_pages2_rangevalidate_inode_pages2_range - remove range of pages from an address_space*@mapping: the address_space*@start: the page offset 'from' which to invalidate*@end: the page offset 'to' which to invalidate (inclusive)* Any pages which are found to be mapped
shrink_page_listshrink_page_list() returns the number of reclaimed pages
__isolate_lru_pageAttempt to remove the specified page from its LRU. Only take this page* if it is of the appropriate PageActive status. Pages which are being* freed elsewhere are also ignored.* returns 0 on success, -ve errno on failure.
page_get_anon_vmaGetting a lock on a stable anon_vma from a page off the LRU is tricky!* Since there is no serialization what so ever against page_remove_rmap()* the best this function can do is return a locked anon_vma that might* have been relevant to this page
page_lock_anon_vma_readSimilar 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
page_mkclean
page_not_mapped
free_swap_cacheIf we are the only user, then try to free up the swap cache. * Its ok to check for PageSwapCache without the page lock* here because we are going to recheck again inside* try_to_free_swap() _with_ the lock.* - Marcelo
__try_to_reclaim_swaprns 1 if swap entry is freed
replace_pageplace_page - replace page in vma by new ksm page*@vma: vma that holds the pte pointing to page*@page: the page we are replacing by kpage*@kpage: the ksm page we replace page by*@orig_pte: the original value of the pte
__unmap_and_move
unmap_and_move_huge_pageCounterpart of unmap_and_move_page() for hugepage migration
mc_handle_present_pte
mem_cgroup_move_accountmem_cgroup_move_account - move account of the page*@page: the page*@compound: charge the page as compound or small page*@from: mem_cgroup which the page is moved from.*@to: mem_cgroup which the page is moved to. @from != @to.
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.
unpoison_memorypoison_memory - Unpoison a previously poisoned page*@pfn: Page number of the to be unpoisoned page* Software-unpoison a page that has been poisoned by* memory_failure() earlier
page_idle_clear_pte_refs
__replace_page__replace_page - replace page in vma by new page