函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hugetlb_cgroup_charge_cgroup

函数原型:int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, struct hugetlb_cgroup **ptr)

返回类型:int

参数:

类型参数名称
intidx
unsigned longnr_pages
struct hugetlb_cgroup **ptr
184  ret等于0
186  struct hugetlb_cgroup * h_cg = NULL
188  如果hugetlb_cgroup_disabled()则转到:done
194  如果huge_page_order( & hstates[idx])小于Minimum page order trackable by hugetlb cgroup.* At least 3 pages are necessary for all the tracking information.则转到:done
196  again :
197  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
198  h_cg等于hugetlb_cgroup_from_task(当前进程)
199  如果非ss_tryget - try to obtain a reference on the specified css*@css: target css* Obtain a reference on @css unless it already has reached zero and is* being released. This function doesn't care whether @css is on or* offline
200  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
201  转到:again
203  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
205  如果非page_counter_try_charge - try to hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge*@fail: points first counter to hit its limit, if any* Returns %true on success, or %false and @fail if the counter or oneret等于负ENOMEM
207  设置一个css引用
208  done :
209  ptr等于h_cg
210  返回:ret
调用者
名称描述
alloc_huge_page