Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cgroup.c Create Date:2022-07-28 11:08:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:look up cgroup associated with given css_set on the specified hierarchy

Proto:static struct cgroup *cset_cgroup_from_root(struct css_set *cset, struct cgroup_root *root)

Type:struct cgroup

Parameter:

TypeParameterName
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  If cset == The default css_set - used by init and its children prior to any* hierarchies being mounted Then
1403  res = The root cgroup. Root is destroyed on its release.
1404  Else if 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. Then
1405  res = he default cgroup associated with this css_set
1406  Else
1410  c = he cgroup and css_set this link associates
1412  If root == root Then
1413  res = c
1414  Break
1419  BUG_ON(!res)
1420  Return res
Caller
NameDescribe
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