函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:group_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

函数原型:static int cgroup_migrate_execute(struct cgroup_mgctx *mgctx)

返回类型:int

参数:

类型参数名称
struct cgroup_mgctx *mgctx
2392  tset等于asks and csets to migrate
2399  如果he number of tasks in the set
2400  循环
2400  如果非CGROUP_SUBSYS_COUNT
2400  ssid等于0
2400  退出
2400  ss等于cgroup_subsys[ssid]
2401  如果can_attach
2403  ret等于can_attach(tset)
2404  如果ret
2405  failed_ssid等于ssid
2406  转到:out_cancel_attach
2409  当(false)循环
2417  spin_lock_irq( & css_set_lock)
2420  from_cset等于获得任务的css_set
2421  to_cset等于mg_dst_cset
2423  ed get/put for css_set objects
2424  rnal task count, protected by css_set_lock 自加
2425  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
2426  rnal task count, protected by css_set_lock 自减
2431  cgroup_freezer_migrate_task(task, he default cgroup associated with this css_set , he default cgroup associated with this css_set )
2433  put_css_set_locked(from_cset)
2437  spin_unlock_irq( & css_set_lock)
2444  Fields for cgroup_taskset_*() iteration.* Before migration is committed, the target migration tasks are on* ->mg_tasks of the csets on ->src_csets. After, on ->mg_tasks of* the csets on ->dst_csets. ->csets point to either ->src_csets等于dst_csets
2446  如果he number of tasks in the set
2447  循环
2447  如果非CGROUP_SUBSYS_COUNT
2447  ssid等于0
2447  退出
2447  ss等于cgroup_subsys[ssid]
2448  如果attach
2452  当(false)循环
2455  ret等于0
2456  转到:out_release_tset
2458  out_cancel_attach :
2459  如果he number of tasks in the set
2460  循环
2460  如果非CGROUP_SUBSYS_COUNT
2460  ssid等于0
2460  退出
2460  ss等于cgroup_subsys[ssid]
2461  如果ssid恒等于failed_ssid退出
2463  如果cancel_attach
2467  当(false)循环
2469  out_release_tset :
2470  spin_lock_irq( & css_set_lock)
2471  加入二个链表项并重新初始化
2473  加入二个链表项并重新初始化
2474  删除链表项并重新初始化
2476  spin_unlock_irq( & css_set_lock)
2483  he number of tasks in the set 等于0
2484  Fields for cgroup_taskset_*() iteration.* Before migration is committed, the target migration tasks are on* ->mg_tasks of the csets on ->src_csets. After, on ->mg_tasks of* the csets on ->dst_csets. ->csets point to either ->src_csets等于he src and dst cset list running through cset->mg_node
2485  返回:ret
调用者
名称描述
cgroup_migrategroup_migrate - migrate a process or task to a cgroup*@leader: the leader of the process or the task to migrate*@threadgroup: whether @leader points to the whole process or a single task*@mgctx: migration context
cgroup_update_dfl_cssesgroup_update_dfl_csses - update css assoc of a subtree in default hierarchy*@cgrp: root of the subtree to update csses for*@cgrp's control masks have changed and its subtree's css associations* need to be updated accordingly