Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ss_populate_dir - create subsys files in a cgroup directory*@css: target css* On failure, no file is added.

Proto:static int css_populate_dir(struct cgroup_subsys_state *css)

Type:int

Parameter:

TypeParameterName
struct cgroup_subsys_state *css
1678  cgrp = PI: the cgroup that this css is attached to
1682  If flags & CSS_VISIBLE || Not cgroup kernfs entry Then Return 0
1685  If Not PI: the cgroup subsystem that this css is attached to Then
1686  If 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 Then cfts = cgroup_base_files
1688  Else cfts = cgroup-v1.c
1691  ret = cgroup_addrm_files( & self css with NULL ->ss, points back to this cgroup , cgrp, cfts, true)
1692  If ret < 0 Then Return ret
1694  Else
1696  ret = cgroup_addrm_files(css, cgrp, cfts, true)
1697  If ret < 0 Then
1698  failed_cfts = cfts
1699  Go to err
1704  flags |= CSS_VISIBLE
1706  Return 0
1707  err :
1709  If cfts == failed_cfts Then Break
1711  cgroup_addrm_files(css, cgrp, cfts, false)
1713  Return ret
Caller
NameDescribe
cgroup_setup_root
cgroup_apply_control_enablegroup_apply_control_enable - enable or show csses according to control*@cgrp: root of the target subtree* Walk @cgrp's subtree and create new csses or make the existing ones* visible. A css is created invisible if it's being implicitly enabled
cgroup_mkdir
cgroup_initgroup_init - cgroup initialization* Register cgroup filesystem and /proc file, and initialize* any subsystems that didn't request early init.