函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:page_remove_file_rmap

函数原型:static void page_remove_file_rmap(struct page *page, bool compound)

返回类型:void

参数:

类型参数名称
struct page *page
boolcompound
1234  nr等于1
1236  VM_BUG_ON_PAGE(compound && !PageHead(page), page)
1237  lock_page_memcg(page)
1240  如果此条件成立可能性小(为编译器优化)(PageHuge(page))则
1242  atomic_dec(compound_mapcount_ptr(page))
1243  转到:out
1247  如果compoundPageHuge() only returns true for hugetlbfs pages, but not for* normal or transparent huge pages.* PageTransHuge() returns true for both transparent huge and* hugetlbfs pages, but not normal pages. PageTransHuge() can only be
1248 i小于HPAGE_PMD_NR循环
1252  如果非atomic_add_negative( - 1, compound_mapcount_ptr(page))则转到:out
1254  如果PageSwapBacked(page)则__dec_node_page_state(page, NR_SHMEM_PMDMAPPED)
1256  否则__dec_node_page_state(page, NR_FILE_PMDMAPPED)
1258  否则
1259  如果非atomic_add_negative( - 1, & * If the page can be mapped to userspace, encodes the number * of times this page is referenced by a page table.)则转到:out
1268  __mod_lruvec_page_state(page, pagecache pages mapped into pagetables. only modified from process context , - nr)
1270  如果此条件成立可能性小(为编译器优化)(PageMlocked(page))则LRU accounting for clear_page_mlock()
1272  out :
1273  unlock_page_memcg(page)
调用者
名称描述
page_remove_rmappage_remove_rmap - take down pte mapping from a page*@page: page to remove mapping from*@compound: uncharge the page as compound or small page* The caller needs to hold the pte lock.