函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ss_tryget_online_from_dir - get corresponding css from a cgroup dentry*@dentry: directory dentry of interest*@ss: subsystem of interest* If @dentry is a directory for a cgroup which has @ss enabled on it, try* to get the corresponding css and return it

函数原型:struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry, struct cgroup_subsys *ss)

返回类型:struct cgroup_subsys_state

参数:

类型参数名称
struct dentry *dentry
struct cgroup_subsys *ss
6072  kn等于kernfs_node_from_dentry(dentry)
6073  s_type等于s_type
6074  struct cgroup_subsys_state * css = NULL
6078  如果s_type不等于cgroup_fs_types_type不等于cgroup2_fs_type或非knkernfs_type(kn)不等于KERNFS_DIR则返回:错误号
6082  _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
6089  cgrp等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().( * (void__rcu__force * * ) & priv)
6090  如果cgrpcss等于group_css - obtain a cgroup's css for the specified subsystem*@cgrp: the cgroup of interest*@ss: the subsystem of interest (%NULL returns @cgrp->self)* Return @cgrp's css (cgroup_subsys_state) associated with @ss
6093  如果非css或非ss_tryget_online - try to obtain a reference on the specified css if online*@css: target css* Obtain a reference on @css if it's onlinecss等于错误号
6096  _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()
6097  返回:css
调用者
名称描述
cgroup_get_from_fdgroup_get_from_fd - get a cgroup pointer from a fd*@fd: fd obtained by open(cgroup2_dir)* Find the cgroup from a fd which should be obtained* by opening a cgroup directory. Returns a pointer to the* cgroup on success. ERR_PTR is returned if the cgroup
memcg_write_event_controlDO NOT USE IN NEW FILES.* Parse input and register new cgroup event handler.* Input must be in format ' '.* Interpretation of args is defined by control file implementation.