函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Called by cgroups to determine if a cpuset is usable; cpuset_mutex held

函数原型:static int cpuset_can_attach(struct cgroup_taskset *tset)

返回类型:int

参数:

类型参数名称
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  如果非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)的值则转到:out_unlock
2123  ret等于task_can_attach(task, user-configured CPUs and Memory Nodes allow to tasks )
2124  如果ret则转到:out_unlock
2126  ret等于security_task_setscheduler(task)
2127  如果ret则转到: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  返回:ret