Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static int cgroup_migrate_execute(struct cgroup_mgctx *mgctx)

Type:int

Parameter:

TypeParameterName
struct cgroup_mgctx *mgctx
2392  tset = asks and csets to migrate
2399  If he number of tasks in the set Then
2400  Do
2400  If Not CGROUP_SUBSYS_COUNT Then
2400  ssid = 0
2400  Break
2400  ss = cgroup_subsys[ssid]
2401  If can_attach Then
2403  ret = can_attach(tset)
2404  If ret Then
2405  failed_ssid = ssid
2406  Go to out_cancel_attach
2409  When (false) cycle
2417  spin_lock_irq( & css_set_lock)
2420  from_cset = ask_css_set - obtain a task's css_set*@task: the task to obtain css_set for* See task_css_set_check().
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  If he number of tasks in the set Then
2447  Do
2447  If Not CGROUP_SUBSYS_COUNT Then
2447  ssid = 0
2447  Break
2447  ss = cgroup_subsys[ssid]
2452  When (false) cycle
2455  ret = 0
2456  Go to out_release_tset
2458  out_cancel_attach :
2459  If he number of tasks in the set Then
2460  Do
2460  If Not CGROUP_SUBSYS_COUNT Then
2460  ssid = 0
2460  Break
2460  ss = cgroup_subsys[ssid]
2461  If ssid == failed_ssid Then Break
2463  If cancel_attach Then
2467  When (false) cycle
2469  out_release_tset :
2470  spin_lock_irq( & css_set_lock)
2471  list_splice_init - join two lists and reinitialise the emptied list.*@list: the new list to add.*@head: the place to add it in the first list.* The list at @list is reinitialised
2473  list_splice_tail_init - join two lists and reinitialise the emptied list*@list: the new list to add.*@head: the place to add it in the first list.* Each of the lists is a queue.* The list at @list is reinitialised
2474  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
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  Return ret
Caller
NameDescribe
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