Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\hugetlb_cgroup.h Create Date:2022-07-28 15:24:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:set_hugetlb_cgroup

Proto:static inline int set_hugetlb_cgroup(struct page *page, struct hugetlb_cgroup *h_cg)

Type:int

Parameter:

TypeParameterName
struct page *page
struct hugetlb_cgroup *h_cg
41  VM_BUG_ON_PAGE(!PageHuge(page), page)
43  If compound_order(page) < Minimum page order trackable by hugetlb cgroup.* At least 3 pages are necessary for all the tracking information. Then Return -1
45  *@private: Mapping-private opaque data. * Usually used for buffer_heads if PagePrivate. * Used for swp_entry_t if PageSwapCache. * Indicates order in the buddy system if PageBuddy. = h_cg
46  Return 0
Caller
NameDescribe
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