Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Subpool accounting for allocating and reserving pages

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

Type:long

Parameter:

TypeParameterName
struct hugepage_subpool *spool
longdelta
137  ret = delta
139  If Not spool Then Return ret
142  spin_lock( & lock)
144  If Maximum huge pages or -1 if no maximum. != -1 Then
145  If Used count against maximum, includes + delta <= Maximum huge pages or -1 if no maximum. Then Used count against maximum, includes += delta
147  Else
148  ret = -ENOMEM
149  Go to unlock_ret
154  If Minimum huge pages or -1 if no minimum. != -1 && Pages reserved against global pool to Then
162  Else
163  ret = 0
168  unlock_ret :
169  spin_unlock( & lock)
170  Return ret
Caller
NameDescribe
hugetlb_fix_reserve_countsA rare out of memory error was encountered which prevented removal of* the reserve map region for a page. The huge page itself was free'ed* and removed from the page cache. This routine will adjust the subpool
alloc_huge_page
hugetlb_reserve_pages