Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cgroup_init_subsys

Proto:static void __init cgroup_init_subsys(struct cgroup_subsys *ss, bool early)

Type:void

Parameter:

TypeParameterName
struct cgroup_subsys *ss
boolearly
5548  pr_debug("Initializing cgroup subsys %s\n", name)
5550  mutex_lock( & cgroup_mutex is the master lock)
5552  dr_init() - Initialise an IDR.*@idr: IDR handle.* Initialise a dynamically allocated IDR. To initialise a* statically allocated IDR, use DEFINE_IDR().
5553  Initialization list head
5556  link to parent, protected by cgroup_lock() = 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.
5557  css = css_alloc(group_css - obtain a cgroup's css for the specified subsystem*@cgrp: the cgroup of interest*@ss: the subsystem of interest (%NULL returns @cgrp->self)* Return @cgrp's css (cgroup_subsys_state) associated with @ss)
5559  BUG_ON(IS_ERR(css))
5560  init_and_link_css(css, ss, & The root cgroup. Root is destroyed on its release. )
5566  flags |= CSS_NO_REF
5568  If early Then
5570  PI: Subsys-unique ID. 0 is unused and root is always 1. The* matching css can be looked up using css_from_id(). = 1
5571  Else
5572  PI: Subsys-unique ID. 0 is unused and root is always 1. The* matching css can be looked up using css_from_id(). = IDR wrappers which synchronize using cgroup_idr_lock
5573  BUG_ON(PI: Subsys-unique ID. 0 is unused and root is always 1. The* matching css can be looked up using css_from_id(). < 0)
5580  Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).[ the following two fields are initialized automtically during boot ] = css
5582  These bitmasks identify subsystems with specific features to avoid* having to do iterative checks repeatedly. |= fork << the following two fields are initialized automtically during boot
5583  have_exit_callback |= exit << the following two fields are initialized automtically during boot
5584  have_release_callback |= release << the following two fields are initialized automtically during boot
5585  have_canfork_callback |= can_fork << the following two fields are initialized automtically during boot
5590  BUG_ON(!list_empty - tests whether a list is empty*@head: the list to test.)
5592  BUG_ON(voke ->css_online() on a new CSS and mark it online if successful )
5594  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
Caller
NameDescribe
cgroup_init_earlygroup_init_early - cgroup initialization at system boot* Initialize cgroups at system boot, and initialize any* subsystems that request early init.
cgroup_initgroup_init - cgroup initialization* Register cgroup filesystem and /proc file, and initialize* any subsystems that didn't request early init.