函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:look up cgroup associated with given css_set on the specified hierarchy

函数原型:static struct cgroup *cset_cgroup_from_root(struct css_set *cset, struct cgroup_root *root)

返回类型:struct cgroup

参数:

类型参数名称
struct css_set *cset
struct cgroup_root *root
1397  struct cgroup * res = NULL
1399  lockdep_assert_held( & cgroup_mutex is the master lock)
1400  lockdep_assert_held( & css_set_lock)
1402  如果cset恒等于The default css_set - used by init and its children prior to any* hierarchies being mounted
1403  res等于 The root cgroup. Root is destroyed on its release.
1404  否则如果root恒等于The default hierarchy, reserved for the subsystems that are otherwise* unattached - it never has more than a single cgroup, and all tasks are* part of that cgroup.
1405  res等于he default cgroup associated with this css_set
1406  否则
1410  c等于he cgroup and css_set this link associates
1412  如果root恒等于root
1413  res等于c
1414  退出
1419  BUG_ON(!res)
1420  返回:res
调用者
名称描述
task_cgroup_from_rootReturn the cgroup for "task" from the given hierarchy. Must be* called with cgroup_mutex and css_set_lock held.
cgroup_do_get_tree
cgroup_path_ns_locked
cgroup_migrate_add_srcgroup_migrate_add_src - add a migration source css_set*@src_cset: the source css_set to add*@dst_cgrp: the destination cgroup*@mgctx: migration context* Tasks belonging to @src_cset are about to be migrated to @dst_cgrp