函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static void cpuset_hotplug_update_tasks(struct cpuset *cs, struct tmpmasks *tmp)

返回类型:void

参数:

类型参数名称
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  如果* Tasks are being attached to this cpuset. Used to prevent * zeroing cpus/mems_allowed between ->can_attach() and ->attach().
3032  percpu_up_write( & cpuset_rwsem)
3033  转到: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  如果 number of CPUs in subparts_cpus 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  如果非tmp或非 partition root state 则转到:update_tasks
3055  如果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的值则
3075  cpuset_force_rebuild()
3083  如果is_partition_root(parent)且 partition root state 恒等于PRS_ERROR或非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 cpuset_force_rebuild()
3089  update_tasks :
3090  cpus_updated等于非pumask_equal - *src1p == *src2p*@src1p: the first input*@src2p: the second input
3091  mems_updated等于非nodes_equal(new_mems, effective_mems)
3093  如果Cgroup v2 behavior is used when on default hierarchy or the* cgroup_v2_mode flag is set.hotplug_update_tasks(cs, & new_cpus, & new_mems, cpus_updated, mems_updated)
3096  否则hotplug_update_tasks_legacy(cs, & new_cpus, & new_mems, cpus_updated, mems_updated)
3100  percpu_up_write( & cpuset_rwsem)
调用者
名称描述
cpuset_hotplug_workfnCPU / memory hotplug is handled asynchronously.