函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:The returned cgroup is fully initialized including its control mask, but* it isn't associated with its kernfs_node and doesn't have the control* mask applied.

函数原型:static struct cgroup *cgroup_create(struct cgroup *parent, const char *name, umode_t mode)

返回类型:struct cgroup

参数:

类型参数名称
struct cgroup *parent
const char *name
umode_tmode
5151  root等于root
5154  level等于* The depth this cgroup is at. The root is at depth zero and each * step down the hierarchy increments the level. This along with * ancestor_ids[] can determine whether a given cgroup is a * descendant of another without traversing the hierarchy.加1
5158  cgrp等于分配内存并置零
5160  如果非cgrp则返回:错误号
5163  ret等于percpu_ref_init - initialize a percpu refcount*@ref: percpu_ref to initialize*@release: function which will be called when refcount hits 0*@flags: PERCPU_REF_INIT_* flags*@gfp: allocation mask to use* Initializes @ref
5164  如果ret则转到:out_free_cgrp
5167  如果group_on_dfl - test whether a cgroup is on the default hierarchy*@cgrp: the cgroup of interest* The default hierarchy is the v2 interface of cgroup and this function* can be used to test whether a cgroup is on the default hierarchy for* cases where a
5168  ret等于stat.c
5169  如果ret则转到:out_cancel_ref
5174  kn等于kernfs_create_dir( cgroup kernfs entry , name, mode, cgrp)
5175  如果是错误
5176  ret等于错误
5177  转到:out_stat_exit
5179  cgroup kernfs entry 等于kn
5181  init_cgroup_housekeeping(cgrp)
5183  PI: the parent css. Placed here for cache proximity to following* fields of the containing structure.等于 self css with NULL ->ss, points back to this cgroup
5184  root等于root
5185  * The depth this cgroup is at. The root is at depth zero and each * step down the hierarchy increments the level. This along with * ancestor_ids[] can determine whether a given cgroup is a * descendant of another without traversing the hierarchy.等于level
5187  ret等于psi_cgroup_alloc(cgrp)
5188  如果ret则转到:out_kernfs_remove
5191  ret等于cgroup_bpf_inherit(cgrp)
5192  如果ret则转到:out_psi_free
5199  Should the cgroup actually be frozen? 等于 Should the cgroup actually be frozen?
5200  如果 Should the cgroup actually be frozen?
5207  设置内存位
5208  设置内存位
5211  spin_lock_irq( & css_set_lock)
5212 tcgrp循环
5213  ids of the ancestors at each level including self [* The depth this cgroup is at. The root is at depth zero and each * step down the hierarchy increments the level. This along with * ancestor_ids[] can determine whether a given cgroup is a * descendant of another without traversing the hierarchy.]等于Inline functions.
5215  如果tcgrp不等于cgrp
5227  spin_unlock_irq( & css_set_lock)
5229  如果notify_on_release(parent)则设置内存位
5232  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from设置内存位
5235  Monotonically increasing unique serial number which defines a* uniform order among all csses. It's guaranteed that all* ->children lists are in the ascending order of ->serial_nr and* used to allow interrupting and resuming iterations.等于Assign a monotonically increasing serial number to csses自加
5238  添加RCU链表项
5239  atomic_inc( & Number of cgroups in the hierarchy, used only for /proc/cgroups )
5240  cgroup_get_live(parent)
5246  如果非group_on_dfl - test whether a cgroup is on the default hierarchy*@cgrp: the cgroup of interest* The default hierarchy is the v2 interface of cgroup and this function* can be used to test whether a cgroup is on the default hierarchy for* cases where a * The bitmask of subsystems enabled on the child cgroups. * ->subtree_control is the one configured through * "cgroup.subtree_control" while ->child_ss_mask is the effective * one which may have more subsystems enabled. Controller knobs * are made availabl等于subsystems visibly enabled on a cgroup
5249  group_propagate_control - refresh control masks of a subtree*@cgrp: root of the target subtree* For @cgrp and its subtree, ensure ->subtree_ss_mask matches* ->subtree_control and propagate controller availability through the
5251  返回:cgrp
5253  out_psi_free :
5254  psi_cgroup_free(cgrp)
5255  out_kernfs_remove :
5256  kernfs_remove( cgroup kernfs entry )
5257  out_stat_exit :
5258  如果group_on_dfl - test whether a cgroup is on the default hierarchy*@cgrp: the cgroup of interest* The default hierarchy is the v2 interface of cgroup and this function* can be used to test whether a cgroup is on the default hierarchy for* cases where a cgroup_rstat_exit(cgrp)
5260  out_cancel_ref :
5261  percpu_ref_exit - undo percpu_ref_init()*@ref: percpu_ref to exit* This function exits @ref
5262  out_free_cgrp :
5263  kfree(cgrp)
5264  返回:错误号
调用者
名称描述
cgroup_mkdir