Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd, struct cpumask *newmask, struct tmpmasks *tmp)

Type:int

Parameter:

TypeParameterName
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  If Not is_partition_root(parent) || newmask && pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear. || Not newmask && pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear. Then Return -EINVAL
1142  If 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 Then Return -EBUSY
1150  If cmd == Enable partition root && ( Not pumask_subset - (*src1p & ~*src2p) == 0*@src1p: the first input*@src2p: the second input* Returns 1 if *@src1p is a subset of *@src2p, else returns 0 || pumask_equal - *src1p == *src2p*@src1p: the first input*@src2p: the second input) Then Return -EINVAL
1158  adding = deleting = false
1159  If cmd == Enable partition root Then
1160  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
1161  adding = true
1162  Else if cmd == Disable partition root Then
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  Else if newmask Then
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  If Not deleting Then Return -EINVAL
1197  Else
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  If cmd == Update parent's subparts_cpus Then
1214  prev_prs = partition root state
1224  Break
1228  Break
1233  part_error = prev_prs == PRS_ERROR
1236  If Not part_error && partition root state == PRS_ERROR Then Return 0
1239  If partition root state == PRS_ERROR Then
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  If Not adding && Not deleting Then Return 0
1256  spin_lock_irq( & callback_lock)
1257  If adding Then
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  If deleting Then
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  Return cmd == Update parent's subparts_cpus
Caller
NameDescribe
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