函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd, struct cpumask *newmask, struct tmpmasks *tmp)

返回类型:int

参数:

类型参数名称
struct cpuset *cpuset
intcmd
struct cpumask *newmask
struct tmpmasks *tmp
1121  parent等于parent_cs(cpuset)
1124  bool part_error = false
1126  percpu_rwsem_assert_held( & cpuset_rwsem)
1133  如果非is_partition_root(parent)或newmaskpumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.或非newmaskpumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.则返回:负EINVAL
1142  如果cmd不等于Update parent's subparts_cpus ss_has_online_children - does a css have online children*@css: the target css* Returns %true if @css has any online children; otherwise, %false. This* function can be called from any context but the caller is responsible则返回:负EBUSY
1150  如果cmd恒等于Enable partition root 且非pumask_subset - (*src1p & ~*src2p) == 0*@src1p: the first input*@src2p: the second input* Returns 1 if *@src1p is a subset of *@src2p, else returns 0pumask_equal - *src1p == *src2p*@src1p: the first input*@src2p: the second input的值则返回:负EINVAL
1158  adding = deleting = false
1159  如果cmd恒等于Enable partition root
1160  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
1161  adding = true
1162  否则如果cmd恒等于Disable partition root
1163  deleting等于pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
1165  否则如果newmask
1173  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
1174  deleting等于pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
1177  pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
1178  adding等于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
1185  如果非deleting则返回:负EINVAL
1197  否则
1207  adding等于pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
1209  part_error等于pumask_equal - *src1p == *src2p*@src1p: the first input*@src2p: the second input
1213  如果cmd恒等于Update parent's subparts_cpus
1214  prev_prs等于 partition root state
1224  退出
1228  退出
1233  part_error等于prev_prs恒等于PRS_ERROR
1236  如果非part_error partition root state 恒等于PRS_ERROR则返回:0
1239  如果 partition root state 恒等于PRS_ERROR
1243  adding = false
1244  deleting等于pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
1248  如果非adding且非deleting则返回:0
1256  spin_lock_irq( & callback_lock)
1257  如果adding
1258  pumask_or - *dstp = *src1p | *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input
1260  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
1263  如果deleting
1264  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
1269  pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
1270  pumask_or - *dstp = *src1p | *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input
1274  number of CPUs in subparts_cpus 等于pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in.
1275  spin_unlock_irq( & callback_lock)
1277  返回:cmd恒等于Update parent's subparts_cpus
调用者
名称描述
update_cpumasks_hierpdate_cpumasks_hier - Update effective cpumasks and tasks in the subtree*@cs: the cpuset to consider*@tmp: temp variables for calculating effective_cpus & partition setup* When congifured cpumask is changed, the effective cpumasks of this cpuset
update_cpumaskpdate_cpumask - update the cpus_allowed mask of a cpuset and all tasks in it*@cs: the cpuset to consider*@trialcs: trial cpuset*@buf: buffer of cpu numbers written to this cpuset
update_prstatepdate_prstate - update partititon_root_state* Call with cpuset_mutex held.
cpuset_hotplug_update_taskspuset_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