Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:page_remove_file_rmap

Proto:static void page_remove_file_rmap(struct page *page, bool compound)

Type:void

Parameter:

TypeParameterName
struct page *page
boolcompound
1234  nr = 1
1236  VM_BUG_ON_PAGE(compound && !PageHead(page), page)
1237  lock_page_memcg(page)
1240  If Value for the false possibility is greater at compile time(PageHuge(page)) Then
1242  atomic_dec(compound_mapcount_ptr(page))
1243  Go to out
1247  If compound && PageHuge() 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 Then
1248  When i < HPAGE_PMD_NR cycle
1252  If Not atomic_add_negative( - 1, compound_mapcount_ptr(page)) Then Go to out
1254  If PageSwapBacked(page) Then __dec_node_page_state(page, NR_SHMEM_PMDMAPPED)
1256  Else __dec_node_page_state(page, NR_FILE_PMDMAPPED)
1258  Else
1259  If Not 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.) Then Go to out
1268  __mod_lruvec_page_state(page, pagecache pages mapped into pagetables. only modified from process context , - nr)
1270  If Value for the false possibility is greater at compile time(PageMlocked(page)) Then LRU accounting for clear_page_mlock()
1272  out :
1273  unlock_page_memcg(page)
Caller
NameDescribe
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.