Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Dissolve a given free hugepage into free buddy pages. This function does* nothing for in-use hugepages and non-hugepages.* This function returns values like below:* -EBUSY: failed to dissolved free hugepages or the hugepage is in-use

Proto:int dissolve_free_huge_page(struct page *page)

Type:int

Parameter:

TypeParameterName
struct page *page
1484  rc = -EBUSY
1487  If Not PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details. Then Return 0
1490  spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
1491  If Not PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details. Then
1492  rc = 0
1493  Go to out
1496  If Not page_count(page) Then
1497  head = compound_head(page)
1498  h = page_hstate(head)
1499  nid = page_to_nid(head)
1500  If free_huge_pages - resv_huge_pages == 0 Then Go to out
1506  If PageHWPoison(head) && page != head Then
1510  deletes entry from list
1511  free_huge_pages--
1512  free_huge_pages_node[nid]--
1513  max_huge_pages--
1514  update_and_free_page(h, head)
1515  rc = 0
1517  out :
1518  spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
1519  Return rc
Caller
NameDescribe
dissolve_free_huge_pagesDissolve free hugepages in a given pfn range
me_huge_pageHuge pages. Needs work.* Issues:* - Error on hugepage is contained in hugepage unit (not in raw page unit.)* To narrow down kill region to one page, we need to break up pmd.
memory_failure_hugetlb
soft_offline_huge_page
soft_offline_free_page