函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:d_css_set - return a new css_set with one cgroup updated*@old_cset: the baseline css_set*@cgrp: the cgroup to be updated* Return a new css_set that's equivalent to @old_cset, but with @cgrp* substituted into the appropriate hierarchy.

函数原型:static struct css_set *find_css_set(struct css_set *old_cset, struct cgroup *cgrp)

返回类型:struct css_set

参数:

类型参数名称
struct css_set *old_cset
struct cgroup *cgrp
1181  struct cgroup_subsys_state * template[CGROUP_SUBSYS_COUNT] = {}
1189  lockdep_assert_held( & cgroup_mutex is the master lock)
1193  spin_lock_irq( & css_set_lock)
1194  cset等于d_existing_css_set - init css array and find the matching css_set*@old_cset: the css_set that we're using before the cgroup transition*@cgrp: the cgroup that we're moving into*@template: out param for the new set of csses, should be clear on entry
1195  如果cseted get/put for css_set objects
1197  spin_unlock_irq( & css_set_lock)
1199  如果cset则返回:cset
1202  cset等于分配内存并置零
1203  如果非cset则返回:NULL
1207  如果allocate_cgrp_cset_links - allocate cgrp_cset_links*@count: the number of links to allocate*@tmp_links: list_head the allocated links are put on* Allocate @count cgrp_cset_link structures and chain them on @tmp_links* through ->cset_link小于0则
1208  kfree(cset)
1209  返回:NULL
1212  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
1213  For a domain cgroup, the following points to self. If threaded,* to the matching cset of the nearest domain ancestor. The* dom_cset provides access to the domain cgroup and its csses to* which domain level resource consumptions should be charged.等于cset
1214  初始化链表头
1215  初始化链表头
1216  初始化链表头
1217  初始化链表头
1218  初始化链表头
1219  INIT_HLIST_NODE( & List running through all cgroup groups in the same hash* slot. Protected by css_set_lock)
1220  初始化链表头
1221  初始化链表头
1222  初始化链表头
1226  内存复制(Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time)., template, Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).的长度)
1228  spin_lock_irq( & css_set_lock)
1231  c等于he cgroup and css_set this link associates
1233  如果root恒等于rootc等于cgrp
1235  link_css_set - a helper function to link a css_set to a cgroup*@tmp_links: cgrp_cset_link objects allocated by allocate_cgrp_cset_links()*@cset: the css_set to be linked*@cgrp: the destination cgroup
1238  BUG_ON(!链表为空)
1240  1 for init_css_set 自加
1243  key等于css_set_hash(Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).)
1244  hash_add - add an object to a hashtable*@hashtable: hashtable to add to*@node: the &struct hlist_node of the object to be added*@key: the key of the object to be added(css_set_table, & List running through all cgroup groups in the same hash* slot. Protected by css_set_lock, key)
1247  css等于Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).[ssid]
1249  添加链表项
1251  获取指定CSS参考
1254  spin_unlock_irq( & css_set_lock)
1262  如果cgroup_is_threaded(he default cgroup associated with this css_set )则
1265  dcset等于d_css_set - return a new css_set with one cgroup updated*@old_cset: the baseline css_set*@cgrp: the cgroup to be updated* Return a new css_set that's equivalent to @old_cset, but with @cgrp* substituted into the appropriate hierarchy.
1266  如果非dcset
1267  put_css_set(cset)
1268  返回:NULL
1271  spin_lock_irq( & css_set_lock)
1272  For a domain cgroup, the following points to self. If threaded,* to the matching cset of the nearest domain ancestor. The* dom_cset provides access to the domain cgroup and its csses to* which domain level resource consumptions should be charged.等于dcset
1273  添加链表项
1275  spin_unlock_irq( & css_set_lock)
1278  返回:cset
调用者
名称描述
find_css_setd_css_set - return a new css_set with one cgroup updated*@old_cset: the baseline css_set*@cgrp: the cgroup to be updated* Return a new css_set that's equivalent to @old_cset, but with @cgrp* substituted into the appropriate hierarchy.
cgroup_migrate_prepare_dstgroup_migrate_prepare_dst - prepare destination css_sets for migration*@mgctx: migration context* Tasks are about to be moved and all the source css_sets have been* preloaded to @mgctx->preloaded_src_csets