Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:group_migrate_prepare_dst - prepare destination css_sets for migration*@mgctx: migration context* Tasks are about to be moved and all the source css_sets have been* preloaded to @mgctx->preloaded_src_csets

Proto:int cgroup_migrate_prepare_dst(struct cgroup_mgctx *mgctx)

Type:int

Parameter:

TypeParameterName
struct cgroup_mgctx *mgctx
2622  lockdep_assert_held( & cgroup_mutex is the master lock)
2631  dst_cset = d_css_set - return a new css_set with one cgroup updated*@old_cset: the baseline css_set*@cgrp: the cgroup to be updated* Return a new css_set that's equivalent to @old_cset, but with @cgrp* substituted into the appropriate hierarchy.
2632  If Not dst_cset Then Return -ENOMEM
2635  WARN_ON_ONCE(mg_dst_cset || mg_dst_cset)
2642  If src_cset == dst_cset Then
2643  If this cset is acting as the source of migration the following* two fields are set. mg_src_cgrp and mg_dst_cgrp are* respectively the source and destination cgroups of the on-going* migration. mg_dst_cset is the destination cset the target tasks = NULL
2644  mg_dst_cgrp = NULL
2645  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
2646  put_css_set(src_cset)
2647  put_css_set(dst_cset)
2648  Continue
2651  mg_dst_cset = dst_cset
2653  If list_empty - tests whether a list is empty*@head: the list to test. Then list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
2656  Else put_css_set(dst_cset)
2659  r_each_subsys - iterate all enabled cgroup subsystems*@ss: the iteration cursor*@ssid: the index of @ss, CGROUP_SUBSYS_COUNT after reaching the end(ss, ssid)
2660  If Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).[ssid] != Set of subsystem states, one for each subsystem. This array is* immutable after creation apart from the init_css_set during* subsystem registration (at boot time).[ssid] Then subsystems affected by migration |= 1 << ssid
2664  Return 0
Caller
NameDescribe
cgroup_attach_taskgroup_attach_task - attach a task or a whole threadgroup to a cgroup*@dst_cgrp: the cgroup to attach to*@leader: the task or the leader of the threadgroup to be attached*@threadgroup: attach the whole threadgroup?
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
cgroup_transfer_tasksgroup_trasnsfer_tasks - move tasks from one cgroup to another*@to: cgroup to which the tasks will be moved*@from: cgroup in which the tasks currently reside* Locking rules between cgroup_post_fork() and the migration path* guarantee that, if a task is