Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static void update_tasks_nodemask(struct cpuset *cs)

Type:void

Parameter:

TypeParameterName
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  When 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. cycle
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  If Not mm Then Continue
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  If migrate Then cpuset_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  Else 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
Caller
NameDescribe
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.