函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\hugetlb_cgroup.h Create Date:2022-07-27 16:55:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:set_hugetlb_cgroup

函数原型:static inline int set_hugetlb_cgroup(struct page *page, struct hugetlb_cgroup *h_cg)

返回类型:int

参数:

类型参数名称
struct page *page
struct hugetlb_cgroup *h_cg
41  VM_BUG_ON_PAGE(!PageHuge(page), page)
43  如果compound_order(page)小于Minimum page order trackable by hugetlb cgroup.* At least 3 pages are necessary for all the tracking information.则返回:负1
45  私有数据指针等于h_cg
46  返回:0
调用者
名称描述
prep_new_huge_page
hugetlb_cgroup_move_parentShould be called with hugetlb_lock held.* Since we are holding hugetlb_lock, pages cannot get moved from* active list or uncharged from the cgroup, So no need to get* page reference and test for page active here. This function* cannot fail.
hugetlb_cgroup_commit_chargeShould be called with hugetlb_lock held
hugetlb_cgroup_uncharge_pageShould be called with hugetlb_lock held
hugetlb_cgroup_migratehugetlb_lock will make sure a parallel cgroup rmdir won't happen* when we migrate hugepages