Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-28 15:31:49
Last Modify:2020-03-17 22:28:11 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Allocate a new page for page migration based on vma policy

Proto:static struct page *new_page(struct page *page, unsigned long start)

Type:struct page

Parameter:

TypeParameterName
struct page *page
unsigned longstart
1183  address = address
1185  vma = Look up the first VMA which satisfies addr < vm_end, NULL if none.
1186  When vma cycle
1187  address = At what user virtual address is page expected in vma?* Caller should check the page is actually part of the vma.
1188  If address != -EFAULT Then Break
1190  vma = linked list of VM areas per task, sorted by address
1193  If PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details. Then
1194  Return mempolicy aware migration callback
1196  Else if 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
1199  thp = alloc_hugepage_vma(GFP_TRANSHUGE, vma, address, HPAGE_PMD_ORDER)
1201  If Not thp Then Return NULL
1203  prep_transhuge_page(thp)
1204  Return thp
1209  Return alloc_page_vma(GFP_HIGHUSER_MOVABLE | __GFP_RETRY_MAYFAIL, vma, address)