函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hugetlb_cgroup_init

函数原型:static void hugetlb_cgroup_init(struct hugetlb_cgroup *h_cgroup, struct hugetlb_cgroup *parent_h_cgroup)

返回类型:void

参数:

类型参数名称
struct hugetlb_cgroup *h_cgroup
struct hugetlb_cgroup *parent_h_cgroup
75 idx小于HUGE_MAX_HSTATE循环
76  counter等于* the counter to account for hugepages from hugetlb.[idx]
77  struct page_counter * parent = NULL
81  如果parent_h_cgroupparent等于* the counter to account for hugepages from hugetlb.[idx]
83  page_counter_init(counter, parent)
85  limit等于und_down - round down to next specified power of 2*@x: the value to round*@y: multiple to round down to (must be a power of 2)* Rounds @x down to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding down, use rounddown() below.(PAGE_COUNTER_MAX, 1 << huge_page_order( & hstates[idx]))
87  ret等于page_counter_set_max - set the maximum number of pages allowed*@counter: counter*@nr_pages: limit to set* Returns 0 on success, -EBUSY if the current number of pages on the* counter already exceeds the specified limit.
88  VM_BUG_ON(ret)
调用者
名称描述
hugetlb_cgroup_css_alloc