函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pdate_tasks_nodemask - Update the nodemasks of tasks in the cpuset.*@cs: the cpuset in which each task's mems_allowed mask needs to be changed* Iterate through each task of @cs updating its mems_allowed to the* effective cpuset's

函数原型:static void update_tasks_nodemask(struct cpuset *cs)

返回类型:void

参数:

类型参数名称
struct cpuset *cs
1649  cpuset_being_rebound等于cs
1651  Return in *pmask the portion of a cpusets's mems_allowed that* are online, with memory
1663  ss_task_iter_start - initiate task iteration*@css: the css to walk tasks of*@flags: CSS_TASK_ITER_* flags*@it: the task iterator to use* Initiate iteration through the tasks of @css
1664 task等于ss_task_iter_next - return the next task for the iterator*@it: the task iterator being iterated* The "next" function for task iteration. @it should have been* initialized via css_task_iter_start(). Returns NULL when the iteration* reaches the end.循环
1668  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
1670  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
1671  如果非mm则继续下一循环
1674  migrate等于is_memory_migrate(cs)
1676  Rebind each vma in mm to new nodemask.* Call holding a reference to mm. Takes mm->mmap_sem during call.
1677  如果migratecpuset_migrate_mm(mm, & * 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, & newmems)
1679  否则Decrement the use count and release all resources for an mm.
1682  ss_task_iter_end - finish task iteration*@it: the task iterator to finish* Finish task iteration started by css_task_iter_start().
1688  * 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等于newmems
1691  cpuset_being_rebound = NULL
调用者
名称描述
update_nodemasks_hierpdate_nodemasks_hier - Update effective nodemasks and tasks in the subtree*@cs: the cpuset to consider*@new_mems: a temp variable for calculating new effective_mems* When configured nodemask is changed, the effective nodemasks of this cpuset
hotplug_update_tasks_legacy
hotplug_update_tasks
cpuset_hotplug_workfnCPU / memory hotplug is handled asynchronously.