函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ss_set_move_task - move a task from one css_set to another*@task: task being moved*@from_cset: css_set @task currently belongs to (may be NULL)*@to_cset: new css_set @task is being moved to (may be NULL)*@use_mg_tasks: move to @to_cset->mg_tasks instead

函数原型:static void css_set_move_task(struct task_struct *task, struct css_set *from_cset, struct css_set *to_cset, bool use_mg_tasks)

返回类型:void

参数:

类型参数名称
struct task_struct *task
struct css_set *from_cset
struct css_set *to_cset
booluse_mg_tasks
882  lockdep_assert_held( & css_set_lock)
884  如果to_cset且非ss_set_populated - does a css_set contain any tasks?*@cset: target css_set* css_set_populated() should be the same as !!cset->nr_tasks at steady* statess_set_update_populated - update populated state of a css_set*@cset: target css_set*@populated: whether @cset is populated or depopulated*@cset is either getting the first task or losing the last. Update the
887  如果from_cset
888  WARN_ON_ONCE(链表为空)
890  @task is leaving, advance task iterators which are pointing to it so* that they can resume at the next position. Advancing an iterator might* remove it from the list, use safe walk. See css_task_iter_skip() for* details.
891  删除链表项并重新初始化
892  如果非ss_set_populated - does a css_set contain any tasks?*@cset: target css_set* css_set_populated() should be the same as !!cset->nr_tasks at steady* statess_set_update_populated - update populated state of a css_set*@cset: target css_set*@populated: whether @cset is populated or depopulated*@cset is either getting the first task or losing the last. Update the
894  否则
895  WARN_ON_ONCE(!链表为空)
898  如果to_cset
904  WARN_ON_ONCE(任务标志 & Getting shut down )
906  group_move_task - move task to a different cgroup*@task: the task*@to: the target css_set* Move task to a new cgroup and safely migrate its associated stall* state between the different groups
907  添加链表项
调用者
名称描述
cgroup_migrate_executegroup_taskset_migrate - migrate a taskset*@mgctx: migration context* Migrate tasks in @mgctx as setup by migration preparation functions.* This function fails iff one of the ->can_attach callbacks fails and
cgroup_post_forkgroup_post_fork - called on a new task after adding it to the task list*@child: the task in question* Adds the task to the list running through its css_set if necessary and* call the subsystem fork() callbacks
cgroup_exitgroup_exit - detach cgroup from exiting task*@tsk: pointer to task_struct of exiting process* Description: Detach cgroup from @tsk.