Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static int free_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed, bool acct_surplus)

Type:int

Parameter:

TypeParameterName
struct hstate *h
nodemask_t *nodes_allowed
boolacct_surplus
1444  ret = 0
1451  If ( Not acct_surplus || surplus_huge_pages_node[node]) && Not list_empty - tests whether a list is empty*@head: the list to test. Then
1453  page = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(next, structpage, lru)
1456  deletes entry from list
1457  free_huge_pages--
1458  free_huge_pages_node[node]--
1459  If acct_surplus Then
1463  update_and_free_page(h, page)
1464  ret = 1
1465  Break
1469  Return ret
Caller
NameDescribe
return_unused_surplus_pagesThis routine has two main purposes:* 1) Decrement the reservation count (resv_huge_pages) by the value passed* in unused_resv_pages
set_max_huge_pages