函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Freeze or unfreeze all tasks in the given cgroup.

函数原型:static void cgroup_do_freeze(struct cgroup *cgrp, bool freeze)

返回类型:void

参数:

类型参数名称
struct cgroup *cgrp
boolfreeze
182  lockdep_assert_held( & cgroup_mutex is the master lock)
184  spin_lock_irq( & css_set_lock)
185  如果freeze设置内存位
187  否则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).
189  spin_unlock_irq( & css_set_lock)
191  如果freezecgroup_path() takes a spin lock(freeze, cgrp)
193  否则cgroup_path() takes a spin lock(unfreeze, cgrp)
196  ss_task_iter_start - initiate task iteration*@css: the css to walk tasks of*@flags: CSS_TASK_ITER_* flags*@it: the task iterator to use* Initiate iteration through the tasks of @css
197 task等于ss_task_iter_next - return the next task for the iterator*@it: the task iterator being iterated* The "next" function for task iteration. @it should have been* initialized via css_task_iter_start(). Returns NULL when the iteration* reaches the end.循环
202  如果任务标志按位与I am a kernel thread 则继续下一循环
204  Freeze or unfreeze the task by setting or clearing the JOBCTL_TRAP_FREEZE* jobctl bit.
206  ss_task_iter_end - finish task iteration*@it: the task iterator to finish* Finish task iteration started by css_task_iter_start().
212  spin_lock_irq( & css_set_lock)
213  如果* Keep track of total numbers of visible and dying descent cgroups. * Dying cgroups are cgroups which were deleted by a user, * but are still existing because someone else is holding a reference. * max_descendants is a maximum allowed number of descent cgr恒等于 Number of frozen descendant cgroups Revisit the cgroup frozen state.* Checks if the cgroup is really frozen and perform all state transitions.
215  spin_unlock_irq( & css_set_lock)
调用者
名称描述
cgroup_freeze