Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This routine has two main purposes:* 1) Decrement the reservation count (resv_huge_pages) by the value passed* in unused_resv_pages

Proto:static void return_unused_surplus_pages(struct hstate *h, unsigned long unused_resv_pages)

Type:void

Parameter:

TypeParameterName
struct hstate *h
unsigned longunused_resv_pages
1801  If hstate_is_gigantic(h) Then Go to out
1808  nr_pages = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(unused_resv_pages, surplus_huge_pages)
1822  When nr_pages-- cycle
1823  resv_huge_pages--
1824  unused_resv_pages--
1825  If Not Free huge page from pool from next node to free.* Attempt to keep persistent huge pages more or less* balanced over allowed nodes.* Called with hugetlb_lock locked. Then Go to out
1827  cond_resched_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
1830  out :
1832  resv_huge_pages -= unused_resv_pages
Caller
NameDescribe
hugetlb_acct_memoryForward declaration