Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:int cgroup_migrate(struct task_struct *leader, bool threadgroup, struct cgroup_mgctx *mgctx)

Type:int

Parameter:

TypeParameterName
struct task_struct *leader
boolthreadgroup
struct cgroup_mgctx *mgctx
2695  spin_lock_irq( & css_set_lock)
2696  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
2697  task = leader
2698  Do
2699  group_migrate_add_task - add a migration target task to a migration context*@task: target task*@mgctx: target migration context* Add @task, which is a migration target, to @mgctx->tset. This function* becomes noop if @task doesn't need to be migrated
2700  If Not threadgroup Then Break
2703  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
2704  spin_unlock_irq( & css_set_lock)
2706  Return 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
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_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