函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static void hugetlb_cgroup_move_parent(int idx, struct hugetlb_cgroup *h_cg, struct page *page)

返回类型:void

参数:

类型参数名称
intidx
struct hugetlb_cgroup *h_cg
struct page *page
131  parent等于parent_hugetlb_cgroup(h_cg)
133  page_hcg等于hugetlb_cgroup_from_page(page)
139  如果非page_hcgpage_hcg不等于h_cg则转到:out
142  nr_pages等于Returns the number of pages in this potentially compound page.
143  如果非parent
144  parent等于root_h_cgroup
146  page_counter_charge - hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge* NOTE: This does not consider any configured counter limits.
148  counter等于* the counter to account for hugepages from hugetlb.[idx]
150  page_counter_cancel - take pages out of the local counter*@counter: counter*@nr_pages: number of pages to cancel
152  set_hugetlb_cgroup(page, parent)
153  out :
154  返回
调用者
名称描述
hugetlb_cgroup_css_offlineForce the hugetlb cgroup to empty the hugetlb resources by moving them to* the parent cgroup.