Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__page_set_anon_rmap - set up new anonymous rmap*@page: Page or Hugepage to add to rmap*@vma: VM area to add page to.*@address: User virtual address of the mapping *@exclusive: the page is exclusively owned by the current process

Proto:static void __page_set_anon_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address, int exclusive)

Type:void

Parameter:

TypeParameterName
struct page *page
struct vm_area_struct *vma
unsigned longaddress
intexclusive
1049  anon_vma = Serialized by page_table_lock
1051  BUG_ON(!anon_vma)
1053  If PageAnon(page) Then Return
1061  If Not exclusive Then anon_vma = Root of this anon_vma tree
1064  anon_vma = anon_vma + On an anonymous page mapped into a user virtual memory area,* page->mapping points to its anon_vma, not to a struct address_space;* with the PAGE_MAPPING_ANON bit set to distinguish it
1065  See page-flags.h for PAGE_MAPPING_FLAGS = anon_vma
1066  Our offset within mapping. = linear_page_index(vma, address)
Caller
NameDescribe
do_page_add_anon_rmapSpecial version of the above for do_swap_page, which often runs* into pages that are exclusively owned by the current process.* Everybody else should continue to use page_add_anon_rmap above.
page_add_new_anon_rmappage_add_new_anon_rmap - add pte mapping to a new anonymous page*@page: the page to add the mapping to*@vma: the vm area in which the mapping is added*@address: the user virtual address mapped*@compound: charge the page as compound or small page
hugepage_add_anon_rmapThe following two functions are for anonymous (private mapped) hugepages.* Unlike common anonymous pages, anonymous hugepages have no accounting code* and no lru code, because we handle hugepages differently from common pages.
hugepage_add_new_anon_rmap