Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cpuset_attach

Proto:static void cpuset_attach(struct cgroup_taskset *tset)

Type:void

Parameter:

TypeParameterName
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  If cs == top_cpuset Then pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
2178  Else 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  If mm Then
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  If Not * Tasks are being attached to this cpuset. Used to prevent * zeroing cpus/mems_allowed between ->can_attach() and ->attach(). Then wake_up( & cpuset_attach_wq)
2227  percpu_up_write( & cpuset_rwsem)