Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Called by cgroups to determine if a cpuset is usable; cpuset_mutex held

Proto:static int cpuset_can_attach(struct cgroup_taskset *tset)

Type:int

Parameter:

TypeParameterName
struct cgroup_taskset *tset
2111  cpuset_attach_old_cs = Retrieve the cpuset for a task
2112  cs = css_cs(css)
2114  percpu_down_write( & cpuset_rwsem)
2117  ret = -ENOSPC
2118  If Not Cgroup v2 behavior is used when on default hierarchy or the* cgroup_v2_mode flag is set. && (pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear. || nodes_empty(mems_allowed)) Then Go to out_unlock
2123  ret = task_can_attach(task, user-configured CPUs and Memory Nodes allow to tasks )
2124  If ret Then Go to out_unlock
2126  ret = security_task_setscheduler(task)
2127  If ret Then Go to out_unlock
2135  * Tasks are being attached to this cpuset. Used to prevent * zeroing cpus/mems_allowed between ->can_attach() and ->attach().++
2136  ret = 0
2137  out_unlock :
2138  percpu_up_write( & cpuset_rwsem)
2139  Return ret