函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cpuset_attach

函数原型:static void cpuset_attach(struct cgroup_taskset *tset)

返回类型:void

参数:

类型参数名称
struct cgroup_taskset *tset
2168  oldcs等于cpuset_attach_old_cs
2170  group_taskset_first - reset taskset and return the first task*@tset: taskset of interest*@dst_cssp: output variable for the destination css*@tset iteration is initialized and the first task is returned.
2171  cs等于css_cs(css)
2173  percpu_down_write( & cpuset_rwsem)
2176  如果cs恒等于top_cpusetpumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
2178  否则Return in pmask the portion of a cpusets's cpus_allowed that* are online. If none are online, walk up the cpuset hierarchy* until we find one that does have some online cpus.* One way or another, we guarantee to return some non-empty subset
2181  Return in *pmask the portion of a cpusets's mems_allowed that* are online, with memory
2188  WARN_ON_ONCE(set_cpus_allowed_ptr(task, Protected by cpuset_mutex. cpus_attach is used only by cpuset_attach()* but we can't allocate it dynamically there. Define it global and* allocate from cpuset_init().))
2190  puset_change_task_nodemask - change task's mems_allowed and mempolicy*@tsk: the task to change*@newmems: new nodes that the task will be set* We use the mems_allowed_seq seqlock to safely update both tsk->mems_allowed
2191  pdate task's spread flag if cpuset's page/slab spread flag is set* Call with callback_lock or cpuset_mutex held.
2198  cpuset_attach_nodemask_to等于effective_mems
2199  cgroup_taskset_for_each_leader - iterate group leaders in a cgroup_taskset*@leader: the loop cursor*@dst_css: the destination css*@tset: taskset to iterate* Iterate threadgroup leaders of @tset. For single-task migrations, @tset* may not contain any.(leader, css, tset)
2200  mm等于get_task_mm - acquire a reference to the task's mm* Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning* this kernel workthread has transiently adopted a user mm with use_mm,* to do its AIO) is not set and if so returns a reference to it, after
2202  如果mm
2221  * This is old Memory Nodes tasks took on. * - top_cpuset.old_mems_allowed is initialized to mems_allowed. * - A new cpuset's old_mems_allowed is initialized when some * task is moved into it. * - old_mems_allowed is used in cpuset_migrate_mm() when we chan等于cpuset_attach_nodemask_to
2223  * Tasks are being attached to this cpuset. Used to prevent * zeroing cpus/mems_allowed between ->can_attach() and ->attach().自减
2224  如果非* Tasks are being attached to this cpuset. Used to prevent * zeroing cpus/mems_allowed between ->can_attach() and ->attach().wake_up( & cpuset_attach_wq)
2227  percpu_up_write( & cpuset_rwsem)