Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static int cgroup_enable_threaded(struct cgroup *cgrp)

Type:int

Parameter:

TypeParameterName
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  If cgroup_is_threaded(cgrp) Then Return 0
3342  If 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 Then Return -EOPNOTSUPP
3347  If Not a domain which isn't connected to the root w/o brekage can't be used || Not an @cgrp become a thread root? should always be true for a thread root Then Return -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  When d_css cycle if (({
3357  Do
3357  When 0 cycle
3357  dsct = PI: the cgroup that this css is attached to
3357  cgroup_is_dead(dsct)
3357  }))
3357  Else If dsct == cgrp || cgroup_is_threaded(dsct) Then
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  If Not ret Then # of live threaded child cgroups ++
3365  cgroup_finalize_control(cgrp, ret)
3366  Return ret
Caller
NameDescribe
cgroup_type_write