函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:init_and_link_css

函数原型:static void init_and_link_css(struct cgroup_subsys_state *css, struct cgroup_subsys *ss, struct cgroup *cgrp)

返回类型:void

参数:

类型参数名称
struct cgroup_subsys_state *css
struct cgroup_subsys *ss
struct cgroup *cgrp
5014  lockdep_assert_held( & cgroup_mutex is the master lock)
5016  cgroup_get_live(cgrp)
5018  memset(css, 0, css的长度)
5019  PI: the cgroup that this css is attached to 等于cgrp
5020  PI: the cgroup subsystem that this css is attached to 等于ss
5021  PI: Subsys-unique ID. 0 is unused and root is always 1. The* matching css can be looked up using css_from_id().等于负1
5022  初始化链表头
5023  初始化链表头
5024  初始化链表头
5025  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自加
5026  atomic_set( & Incremented by online self and children. Used to guarantee that* parents are not offlined before their children., 0)
5028  如果cgroup_parent(cgrp)则
5029  PI: the parent css. Placed here for cache proximity to following* fields of the containing structure.等于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
5030  获取指定CSS参考
5033  如果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 css_rstat_flush添加RCU保护项
5036  BUG_ON(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)
调用者
名称描述
css_create
cgroup_init_subsys