Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__free_huge_page

Proto:static void __free_huge_page(struct page *page)

Type:void

Parameter:

TypeParameterName
struct page *page
1146  h = page_hstate(page)
1147  nid = page_to_nid(page)
1148  spool = page_private(page)
1152  VM_BUG_ON_PAGE(page_count(page), page)
1153  VM_BUG_ON_PAGE(page_mapcount(page), page)
1155  set_page_private(page, 0)
1156  See page-flags.h for PAGE_MAPPING_FLAGS = NULL
1157  restore_reserve = Private page markings that may be used by the filesystem that owns the page* for its own purposes.* - PG_private and PG_private_2 cause releasepage() and co to be invoked
1158  Private page markings that may be used by the filesystem that owns the page* for its own purposes.* - PG_private and PG_private_2 cause releasepage() and co to be invoked
1168  If Not restore_reserve Then
1175  If Subpool accounting for freeing and unreserving pages.* Return the number of global page reservations that must be dropped.* The return value may only be different than the passed value (delta)* in the case where a subpool minimum size must be maintained. == 0 Then restore_reserve = true
1179  spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
1180  clear_page_huge_active(page)
1181  Should be called with hugetlb_lock held
1183  If restore_reserve Then resv_huge_pages++
1186  If Internal hugetlb specific page flag. Do not use outside of the hugetlb* code Then
1187  deletes entry from list
1188  ClearPageHugeTemporary(page)
1189  update_and_free_page(h, page)
1190  Else if surplus_huge_pages_node[nid] Then
1192  deletes entry from list
1193  update_and_free_page(h, page)
1194  surplus_huge_pages--
1195  surplus_huge_pages_node[nid]--
1196  Else
1197  arch_clear_hugepage_flags(page)
1198  enqueue_huge_page(h, page)
1200  spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
Caller
NameDescribe
free_hpage_workfn
free_huge_page