Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cgroup.c Create Date:2022-07-28 11:07:59
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 current task's cgroup namespace on the* specified hierarchy

Proto:static struct cgroup *current_cgns_cgroup_from_root(struct cgroup_root *root)

Type:struct cgroup

Parameter:

TypeParameterName
struct cgroup_root *root
1363  struct cgroup * res = NULL
1366  lockdep_assert_held( & css_set_lock)
1368  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1370  cset = root_cset
1371  If cset == The default css_set - used by init and its children prior to any* hierarchies being mounted Then
1372  res = The root cgroup. Root is destroyed on its release.
1373  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
1374  res = he default cgroup associated with this css_set
1375  Else
1379  c = he cgroup and css_set this link associates
1381  If root == root Then
1382  res = c
1383  Break
1387  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1389  BUG_ON(!res)
1390  Return res
Caller
NameDescribe
cgroup_show_path