Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static long hugepage_subpool_put_pages(struct hugepage_subpool *spool, long delta)

Type:long

Parameter:

TypeParameterName
struct hugepage_subpool *spool
longdelta
182  ret = delta
184  If Not spool Then Return delta
187  spin_lock( & lock)
189  If Maximum huge pages or -1 if no maximum. != -1 Then Used count against maximum, includes -= delta
193  If Minimum huge pages or -1 if no minimum. != -1 && Used count against maximum, includes < Minimum huge pages or -1 if no minimum. Then
194  If Pages reserved against global pool to + delta <= Minimum huge pages or -1 if no minimum. Then ret = 0
196  Else ret = Pages reserved against global pool to + delta - Minimum huge pages or -1 if no minimum.
199  Pages reserved against global pool to += delta
200  If Pages reserved against global pool to > Minimum huge pages or -1 if no minimum. Then Pages reserved against global pool to = Minimum huge pages or -1 if no minimum.
208  unlock_or_release_subpool(spool)
210  Return ret
Caller
NameDescribe
__free_huge_page
alloc_huge_page
hugetlb_vm_op_close
hugetlb_reserve_pages
hugetlb_unreserve_pages