函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:group_enable_threaded - make @cgrp threaded*@cgrp: the target cgroup* Called when "threaded" is written to the cgroup.type interface file and* tries to make @cgrp threaded and join the parent's resource domain.

函数原型:static int cgroup_enable_threaded(struct cgroup *cgrp)

返回类型:int

参数:

类型参数名称
struct cgroup *cgrp
3324  parent等于cgroup_parent(cgrp)
3325  dom_cgrp等于* If !threaded, self. If threaded, it points to the nearest * domain ancestor. Inside a threaded subtree, cgroups are exempt * from process granularity and no-internal-task constraint. * Domain level resource consumptions which aren't tied to a * specific
3330  lockdep_assert_held( & cgroup_mutex is the master lock)
3333  如果cgroup_is_threaded(cgrp)则返回:0
3342  如果 synchronization, the result can only be used as a hint * The bitmask of subsystems enabled on the child cgroups. * ->subtree_control is the one configured through * "cgroup.subtree_control" while ->child_ss_mask is the effective * one which may have more subsystems enabled. Controller knobs * are made availabl按位与some controllers can be threaded on the default hierarchy 的反则返回:负EOPNOTSUPP
3347  如果非a domain which isn't connected to the root w/o brekage can't be used 或非an @cgrp become a thread root? should always be true for a thread root 则返回:负EOPNOTSUPP
3355  group_save_control - save control masks and dom_cgrp of a subtree*@cgrp: root of the target subtree* Save ->subtree_control, ->subtree_ss_mask and ->dom_cgrp to the* respective old_ prefixed fields for @cgrp's subtree including @cgrp* itself.
3357 d_css循环if (({
3357  循环
3357  当0循环
3357  dsct等于PI: the cgroup that this css is attached to
3357  cgroup_is_dead(dsct)
3357  }))
3357  否则如果dsct恒等于cgrpcgroup_is_threaded(dsct)则
3359  * If !threaded, self. If threaded, it points to the nearest * domain ancestor. Inside a threaded subtree, cgroups are exempt * from process granularity and no-internal-task constraint. * Domain level resource consumptions which aren't tied to a * specific 等于dom_cgrp
3361  ret等于cgroup_apply_control(cgrp)
3362  如果非ret # of live threaded child cgroups 自加
3365  cgroup_finalize_control(cgrp, ret)
3366  返回:ret
调用者
名称描述
cgroup_type_write