函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__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

函数原型:static void __page_set_anon_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address, int exclusive)

返回类型:void

参数:

类型参数名称
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  如果PageAnon(page)则返回
1061  如果非exclusiveanon_vma等于Root of this anon_vma tree
1064  anon_vma等于anon_vmaOn 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)
调用者
名称描述
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