Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static void cpuset_change_task_nodemask(struct task_struct *tsk, nodemask_t *newmems)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
nodemask_t *newmems
1618  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
1620  local_irq_disable()
1621  write_seqcount_begin( & mems_allowed_seq)
1623  nodes_or(mems_allowed, mems_allowed, * newmems)
1624  mpol_rebind_task(tsk, newmems)
1625  mems_allowed = newmems
1627  write_seqcount_end( & mems_allowed_seq)
1628  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
1630  task_unlock(tsk)
Caller
NameDescribe
update_tasks_nodemaskpdate_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
cpuset_attach