函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static void return_unused_surplus_pages(struct hstate *h, unsigned long unused_resv_pages)

返回类型:void

参数:

类型参数名称
struct hstate *h
unsigned longunused_resv_pages
1801  如果hstate_is_gigantic(h)则转到:out
1808  nr_pages等于两数取小(unused_resv_pages, surplus_huge_pages)
1822 nr_pages自减循环
1823  resv_huge_pages自减
1824  unused_resv_pages自减
1825  如果非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.则转到: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
调用者
名称描述
hugetlb_acct_memoryForward declaration