Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:puset_hotplug_update_tasks - update tasks in a cpuset for hotunplug*@cs: cpuset in interest*@tmp: the tmpmasks structure pointer* Compare @cs's cpu and mem masks against top_cpuset and if some have gone* offline, update @cs accordingly

Proto:static void cpuset_hotplug_update_tasks(struct cpuset *cs, struct tmpmasks *tmp)

Type:void

Parameter:

TypeParameterName
struct cpuset *cs
struct tmpmasks *tmp
3022  retry :
3023  wait_event - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_UNINTERRUPTIBLE) until the*@condition evaluates to true(cpuset_attach_wq, * Tasks are being attached to this cpuset. Used to prevent * zeroing cpus/mems_allowed between ->can_attach() and ->attach(). == 0)
3025  percpu_down_write( & cpuset_rwsem)
3031  If * Tasks are being attached to this cpuset. Used to prevent * zeroing cpus/mems_allowed between ->can_attach() and ->attach(). Then
3032  percpu_up_write( & cpuset_rwsem)
3033  Go to retry
3036  parent = parent_cs(cs)
3037  mpute_effective_cpumask - Compute the effective cpumask of the cpuset*@new_cpus: the temp variable for the new effective_cpus mask*@cs: the cpuset the need to recompute the new effective_cpus mask*@parent: the parent cpuset* If the parent has subpartition
3038  nodes_and(new_mems, mems_allowed, effective_mems)
3040  If number of CPUs in subparts_cpus Then pumask_andnot - *dstp = *src1p & ~*src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
3047  If Not tmp || Not partition root state Then Go to update_tasks
3055  If is_partition_root(cs) && (pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear. || partition root state == PRS_ERROR ) Then
3075  cpuset_force_rebuild()
3083  If is_partition_root(parent) && ( partition root state == PRS_ERROR || Not pumask_intersects - (*src1p & *src2p) != 0*@src1p: the first input*@src2p: the second input ) && pdate_parent_subparts_cpumask - update subparts_cpus mask of parent cpuset*@cpuset: The cpuset that requests change in partition root state*@cmd: Partition root state change command*@newmask: Optional new cpumask for partcmd_update*@tmp: Temporary addmask Then cpuset_force_rebuild()
3089  update_tasks :
3090  cpus_updated = Not pumask_equal - *src1p == *src2p*@src1p: the first input*@src2p: the second input
3091  mems_updated = Not nodes_equal(new_mems, effective_mems)
3093  If Cgroup v2 behavior is used when on default hierarchy or the* cgroup_v2_mode flag is set. Then hotplug_update_tasks(cs, & new_cpus, & new_mems, cpus_updated, mems_updated)
3096  Else hotplug_update_tasks_legacy(cs, & new_cpus, & new_mems, cpus_updated, mems_updated)
3100  percpu_up_write( & cpuset_rwsem)
Caller
NameDescribe
cpuset_hotplug_workfnCPU / memory hotplug is handled asynchronously.