函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\hugetlb.c Create Date:2022-07-27 16:57:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static int free_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed, bool acct_surplus)

返回类型:int

参数:

类型参数名称
struct hstate *h
nodemask_t *nodes_allowed
boolacct_surplus
1444  ret等于0
1451  如果非acct_surplussurplus_huge_pages_node[node]的值且非链表为空
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.(链表后项, structpage, lru)
1456  删除链表项
1457  free_huge_pages自减
1458  free_huge_pages_node[node]自减
1459  如果acct_surplus
1460  surplus_huge_pages自减
1463  update_and_free_page(h, page)
1464  ret等于1
1465  退出
1469  返回:ret
调用者
名称描述
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