Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Revisit the cgroup frozen state.* Checks if the cgroup is really frozen and perform all state transitions.

Proto:void cgroup_update_frozen(struct cgroup *cgrp)

Type:void

Parameter:

TypeParameterName
struct cgroup *cgrp
56  lockdep_assert_held( & css_set_lock)
63  frozen = st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from && * Number of tasks, which are counted as frozen: * frozen, SIGSTOPped, and PTRACEd. == __cgroup_task_count - count the number of tasks in a cgroup. The caller* is responsible for taking the css_set_lock.*@cgrp: the cgroup in question
66  If frozen Then
68  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Return
71  Atomically set a bit in memory
72  Else
74  If Not st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Return
77  lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
79  group_file_notify - generate a file modified event for a cgroup_file*@cfile: target cgroup_file*@cfile must have been obtained by setting cftype->file_offset.
80  cgroup_path() takes a spin lock(notify_frozen, cgrp, frozen)
83  Propagate the cgroup frozen state upwards by the cgroup tree.
Caller
NameDescribe
cgroup_enter_frozenEnter frozen/stopped state, if not yet there. Update cgroup's counters,* and revisit the state of the cgroup, if necessary.
cgroup_leave_frozenConditionally leave frozen/stopped state
cgroup_do_freezeFreeze or unfreeze all tasks in the given cgroup.
cgroup_freezer_migrate_taskAdjust the task state (freeze or unfreeze) and revisit the state of* source and destination cgroups.
cgroup_exitgroup_exit - detach cgroup from exiting task*@tsk: pointer to task_struct of exiting process* Description: Detach cgroup from @tsk.