函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-27 17:04:39
Last Modify:2020-03-17 22:28:11 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Allocate a new page for page migration based on vma policy

函数原型:static struct page *new_page(struct page *page, unsigned long start)

返回类型:struct page

参数:

类型参数名称
struct page *page
unsigned longstart
1183  address等于address
1185  vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none.
1186 vma循环
1187  address等于At what user virtual address is page expected in vma?* Caller should check the page is actually part of the vma.
1188  如果address不等于负EFAULT退出
1190  vma等于linked list of VM areas per task, sorted by address
1193  如果PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details.
1194  返回:mempolicy aware migration callback
1196  否则如果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
1199  thp等于alloc_hugepage_vma(GFP_TRANSHUGE, vma, address, HPAGE_PMD_ORDER)
1201  如果非thp则返回:NULL
1203  prep_transhuge_page(thp)
1204  返回:thp
1209  返回:alloc_page_vma(GFP_HIGHUSER_MOVABLE | __GFP_RETRY_MAYFAIL, vma, address)